Review main Work in progress

97553[TASK] Find the descendant pages in the frontend with one query

Benni Mack CR 0 V 0 Normal +181 −39 updated 11/19/26, 08:56

Commit message

PageRepository::getDescendantPageIdsRecursive() and
getPageIdsRecursive() walked the page tree with one query per page,
plus a workspace overlay per page in a workspace. They are used by
menus, content objects with "recursive", Extbase storage pids in
the frontend, felogin, the XML sitemaps and the indexed search.

The pages of all levels are now fetched with one query by the
PageDescendantsRepository, resolved for the workspace of the
context. All decisions about the pages are taken as before in PHP:
enable fields and group access including the
RecordAccessGrantedEvent, "extendToSubpages", backend user
sections, excluded pages, mount points and the level to start
collecting. The pages below a mount point need one further query.

For 780 pages below a page, 3 instead of 783 queries are needed,
which takes 10 instead of 57 ms. The number of queries no longer
depends on the number of pages, also in a workspace, where two
queries per page were needed before.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/53/97553/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/53/97553/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 4

  1. main 97560[TASK] Find subpages with one query when copying and deleting pages Based on this change Work in progress Merge conflict Benni Mack CR 0 V -1 Hard +494 −186
  2. 97553 [TASK] Find the descendant pages in the frontend with one query This change

  3. main 97552[TASK] Restrict queries to a page tree without a list of page ids This change is based on it Work in progress Benni Mack CR 0 V 0 Hard +410 −107
  4. main 97537[FEATURE] Find the subpages of a page with one database query This change is based on it Merged Benni Mack CR +2 V +2 Expert +1804 −659

    The chain has patch set 6 of 7, the changes above it need a rebase.

Merge conflicts 4

Issues 2

Files 4

Review log 36

  1. Benni Mack uploaded patch set 1 11/11/26, 15:58

  2. core-ci voted on patch set 1 V +1 11/11/26, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114118

  3. Benni Mack rebased onto patch set 2 V +1 11/15/26, 08:27

  4. core-ci voted on patch set 2 V +1 11/15/26, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114515

  5. Benni Mack rebased onto patch set 3 V +1 11/19/26, 08:45

  6. core-ci voted on patch set 3 V +1 11/19/26, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114978