Skip to content
Snippets Groups Projects
Commit 4eed743e authored by Christian Kuhn's avatar Christian Kuhn Committed by Stefan Bürk
Browse files

[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: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
parent 9925c0be
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment