Actions
Task #100082
openImprove performance of PageLinkBuilder
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2023-03-04
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:
Description
On pages with many links, the PageLinkBuilder can become pretty resource-intensive:
- Because we don't know, which site or page tree the target page belongs to, we first need to fetch the $site object with $siteFinder->getSiteByPageId().
- Internally, this function then needs to recursively fetch the rootline, the target page uid belongs to.
- This needs to be done for every new page id, that we create a link for.
However, on single-site setups, we don't need all this and can safely pass the rootline array, that has already been established in $tsfe. This simple check can save many unnecessary db requests at least for single-site setups.
Actions