Skip to content
Snippets Groups Projects
Commit ca079a29 authored by Alexander Grein's avatar Alexander Grein Committed by Andreas Fernandez
Browse files

[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) for around 10%.

Resolves: #99852
Releases: main, 11.5
Change-Id: I75e8fca96c3eebec72a00e328c634338191d31c1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77750


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 868c8878
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