[TASK] Add CompilableInterface to a couple of view helpers 86/36286/7
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 26 Jan 2015 23:03:45 +0000 (00:03 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 28 Jan 2015 16:33:26 +0000 (17:33 +0100)
commit1c2f2d2ed1cf1588cb38451e5825452d3c036c7b
tree341c81ec22288b9cc1ea893343336afa2d65fd35
parent01b589d36b4be79fc4a612d3aef2a802f6af2a33
[TASK] Add CompilableInterface to a couple of view helpers

This patch changes a couple of view helpers that can easily
implement CompilableInterface to supress object creating at
render time.

TranslateViewHelper is especially interesting since this
one is used very often.

CommentViewHelper additionally overwrites compile() so
child nodes (the comments) are not evaluated at all.

All these view helpers are used in be_user access module
and lead to a speed up from roughly 7 to 5 seconds for
a list of 900 pages on my testsystem, now creating "only"
14 thousand objects instead of 21 thousand.

Change-Id: Ic1f90cb1d1ec013181b26d9274d097ed0a01d08e
Resolves: #64546
Releases: master
Reviewed-on: http://review.typo3.org/36286
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/beuser/Classes/ViewHelpers/ArrayElementViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/SpriteManagerIconViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CommentViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/RawViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/RawViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php