Review main Merged

78784[TASK] Use less memory in BE::getPagesTSconfig()

Christian Kuhn CR +2 V +2 Easy +43 −5 updated 04/21/23, 12:36

Commit message

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

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1