Review main Abandoned

90783[BUGFIX] Improve performance of workspace records in PageRepository

Stefan Froemken CR 0 V -1 Normal +37 −30 updated 02/14/26, 20:10

Commit message

The method PageRepository::getWorkspaceVersionOfRecord()
generated queries that relied on OR conditions (uid with
t3ver_state vs. t3ver_oid). On large datasets this caused
inefficient index usage and resulted in thousands of
repeated lookups, slowing down menu rendering significantly
in workspaces.

The query has been refactored to use a UNION ALL structure,
which allows the database to utilize indexes more
effectively and reduces execution time by more than
50% in practical scenarios.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 1

Review log 56

  1. Stefan Froemken uploaded patch set 1 09/24/25, 09:28

  2. Benni Mack commented on patch set 1 09/24/25, 09:31

    funnily enough, I pulled a change out of my stash. We actually reworked the method (which is finally internal since v13) to get a full $row in instead of the ID, so we do not have to make all the DB queries. In advance, I added this so the DB restrictions check is done separately. https://review.typo3.org/c/Packages/TYPO3.CMS/+/90782
  3. Stefan Froemken commented on patch set 1 09/24/25, 09:38

    Reply

    Ahh. You found another call to getWorkspaceVersionOfRecord. I stumbeled over that coming from PageRepository::versionOL(). I counted the queries to ~800 and wondered about ~1.600 same queries in mysqlreport. Yes, reduzing the calls in general will help a lot.
  4. core-ci voted on patch set 1 V -1 09/24/25, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85440

  5. Benni Mack commented on patch set 1 01/29/26, 17:17

    Hey Stefan, should we use this one now? https://review.typo3.org/c/Packages/TYPO3.CMS/+/90784
  6. Stefan Froemken abandoned the change 02/14/26, 20:10

    Better patch from Benni was used