Issue Task Closed

#82237Backend generates the same URL multiple times, caching can help performance

Claus Due 08/29/17, 19:04 updated 05/07/19, 12:25

Description

The TYPO3 backend is very eager to generate the same URL multiple times. This isn’t necessarily a problem in itself but the UriBuilder both continuously re-loads backend routes and uses a class which takes a constructor argument and immediately parses the provided URL. Those things combined result in several hundred calls to GeneralUtility::makeInstance and about three times as many calls to explode().

Caching (in memory only) a generated URL based on route name, parameters and abs/rel type saves about 2/3 of calls to generate route URLs in the page module alone. Turning the UriBuilder into a singleton further facilitates this and reduces calls to instanciateObject.

Reviews 1