[TASK] Improve performance of Fluid TemplatePaths 62/53862/2
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 10:05:31 +0000 (12:05 +0200)
commit8d355f5479af72fcc716f29d69ac765b2beab733
tree278e528925927af8fcf615809bcce807390f6a46
parent90d5dca2e016274940c47962c9a15b483ac6d097
[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/53862
Tested-by: TYPO3com <no-reply@typo3.com>
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