[TASK] Improve performance of UriBuilder by memory cache 27/53827/10
authorClaus Due <claus@namelesscoder.net>
Tue, 29 Aug 2017 17:07:31 +0000 (19:07 +0200)
committerBenni Mack <benni@typo3.org>
Sun, 28 Oct 2018 14:23:24 +0000 (15:23 +0100)
commitf1d84abd89c0f53ff57edfa0dd0e4a8aacc2769c
treef39b593d75ec945c09d8b6be54adc9634df7c815
parentc399a2e137f4184ccda6fed89f0c7398223726da
[TASK] Improve performance of UriBuilder by memory cache

The TYPO3 backend is eager to generate the same URL
with the same parameters multiple times, causing a lot
of cascading calls to URI parsing, token generation etc.

Turning the UriBuilder into a Singleton removes many
hundreds of calls to instantiate the object - and remembering
the URLs that were generated further saves many hundred
calls to UriBuilder->buildUri in for example the page module.

Change-Id: I7444ccf8bb27789c489f7d7c15c65449fa3456a0
Resolves: #82237
Releases: master
Reviewed-on: https://review.typo3.org/53827
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Routing/UriBuilder.php
typo3/sysext/backend/Tests/Unit/Routing/UriBuilderTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/LinkViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/UriViewHelperTest.php