[BUGFIX] Improve performance of TreeController
The recursive function pagesToFlatArray make use of the page tree repository on two places, which always instantiates the same object. To improve the performance this patch instantiates the page tree only once and stores it in a protected property. Moreover, it adds another protected property editPageAndDefaultLanguageAccess, which holds the general allowance of a backend user to modify pages and access to the default language. This information is needed in the pagesToFlatArray as well and was requested over and over again. Finally, the array_merge construction inside fetchDataAction and filterDataAction was changed to a more performant solution, by merging it after the loop. Overall, this reduces the request time of a page tree ajax call (data and filter) by around 10%. Resolves: #99852 Releases: main, 11.5 Change-Id: I75e8fca96c3eebec72a00e328c634338191d31c1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78304 Tested-by:Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
core-ci <typo3@b13.com>
Please register or sign in to comment