[TASK] Merge performance improvement from TYPO3.Fluid 82/36282/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 26 Jan 2015 20:55:36 +0000 (21:55 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 27 Jan 2015 20:15:53 +0000 (21:15 +0100)
commite4233a100ab228287099d452c8551d8f6f2f2dd2
treef71baaf6fb34056287edca5cb55bf037a0331543
parent520a989aa5999ddcd467d515e2fa106d032fa72b
[TASK] Merge performance improvement from TYPO3.Fluid

Implementing CompilableInterface by adding renderStatic()
can lead to drastic performance improvements since fluid
then calls view helpers statically and the overhead of
instantiation, injection and reflection is gone.

This patch does this for a couple of format view helpers
that have been adapted in TYPO3.Fluid and which do not
differ from "upstream" too much.

As side effect, some of the changed view helpers now also
understand the $value argument.

Performance-wise, this patch is just the tip of the iceberg
and further patches for more often used view helpers will
follow.

TYPO3 Fluid issue: #47674

Resolves: #64521
Releases: master
Change-Id: I923424860c956c4c77cf56c9bf1623bb2fc8c68b
Reviewed-on: http://review.typo3.org/36282
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/fluid/Classes/ViewHelpers/Format/BytesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlspecialcharsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/StripTagsViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/BytesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/StripTagsViewHelperTest.php