[TASK] Use less memory in BE::getPagesTSconfig()
When BackendUtility::getPagesTSconfig() is called with many different page uids, it can be a huge memory hog: The pid-to-tsconfig contains a new object for each pid. However, page TSconfig is often the same for different pages. The patch creates a two-level cache for this. The result can be stunning, for example with the styleguide extension which creates a page tree using DataHandler and then localizes records on it using DataHandler. Measuring with the extension from [1]: Without patch: * create tca data: ~148MB * delete tca data: ~144MB With patch: * create tca data: ~12MB * delete tca data: ~11MB The patch also gives a performance benefit in this use case. [1] https://github.com/lolli42/peak_memory Resolves: #100701 Releases: main Change-Id: I7e5e123d27527403abe68a70a6352e058f5ed088 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78784 Tested-by:Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de>
Please register or sign in to comment