[TASK] Improve performance of Fluid TemplatePaths 24/53824/3
authorClaus Due <claus@namelesscoder.net>
Mon, 28 Aug 2017 20:27:26 +0000 (22:27 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 1 Sep 2017 07:39:15 +0000 (09:39 +0200)
commit31310553bdfe724fd3be0d968cd2b4830bec24b0
tree9996d4c01a9276278ab69b6c1ae6165e22ec4299
parentc5b07cb6ceb879c9d152e9389f0a0462b940e782
[TASK] Improve performance of Fluid TemplatePaths

This patch improves the performance of TemplatePaths
in two ways:

* GeneralUtility::removeDotsFromTS() is called on a far
  smaller array instead of all TypoScript.
* Fallback paths are allowed to be cached in the runtime
  cache which avoids re-reading TypoScript when no
  paths are configured in TS.

Saves several thousand calls to removeDotsFromTs
which in turn saves several tens of thousands of calls
to in_array.

Change-Id: Ib8aef69dc9136d355441ac05f21fe391e524eacc
Resolves: #82232
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53824
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/fluid/Classes/View/TemplatePaths.php
typo3/sysext/fluid/Tests/Unit/View/TemplatePathsTest.php