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