Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress

97560[TASK] Find subpages with one query when copying and deleting pages

Benni Mack CR 0 V -1 Hard +494 −186 updated 11/19/26, 08:58

Commit message

The DataHandler collected the subpages to copy along with a page,
and the subpages to delete or discard along with a page, with one
query per page. In a workspace, copying additionally resolved the
versions of each level and fetched each page again.

Both now fetch the subpages with the PageDescendantsRepository,
keeping the order the pages are copied and deleted in. Pages new
in a workspace below a page to delete are found with the page tree
constraint.

The commands "cleanup:deletedrecords" and "cleanup:versions" fetch
all pages with one query and walk the page tree in PHP, visiting
each page once. Versions referencing each other no longer lead to
an endless recursion.

For 780 pages, copying needs 1 instead of 781 queries to collect
the subpages, and 1 instead of 2185 queries in a workspace.
Deleting needs 2 instead of 781 queries. The cleanup commands save
the queries for the page tree: 12671 instead of 18522 and 5431
instead of 9546 queries.

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/60/97560/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/60/97560/3 && git cherry-pick FETCH_HEAD

Review

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

Relation chain 4

  1. 97560 [TASK] Find subpages with one query when copying and deleting pages This change

  2. main 97553[TASK] Find the descendant pages in the frontend with one query This change is based on it Work in progress Benni Mack CR 0 V 0 Normal +181 −39
  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.

Issues 2

Files 12

Review log 36

  1. Benni Mack uploaded patch set 1 11/11/26, 17:30

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

  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:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114516

  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:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114979