Bug #20670
closedSpeed up BEgetRootLine by reusing parts of the rootline from the cache
0%
Description
Now t3lib_BEfunc::BEgetRootLine() caches whole rootlines without reusing the cache for subparts of other rootlines. Especially in the backend (e.g. on heavy operation that call BEgetRootLine on multiple pages) this means that the same pages will be queried over and over again appearing in different rootlines.
By restructuring the cache and refactroring the method is possible to store single pages into the cache and reuse those cache entries to build new rootlines.
After appling my patch I amount of select statements was reduced to 50% and profiling shows that the BEgetRootLine was 200% faster (when adding the whole pagetree wo the crawler queue)
BEgetRootLine behaves like it does before and the restructured cache in $GLOBALS['T3_VAR']['BEgetRootLine_cache'] is not used in other places in the core.
(issue imported from #M11410)
Files