Review main Abandoned

90785[TASK] Reduce repeated calls to quoteIdentifiersForSelect

Stefan Froemken CR -1 V -1 Easy +22 −1 updated 04/17/26, 19:53

Commit message

When working with workspaces, each record is processed by
PageRepository::versionOL(). This triggers purgeComputedProperties()
which builds the field list using array_keys($row).

As a result, QueryBuilder::quoteIdentifier() is called for every column
on each invocation. With extended page records (80+ columns) and
thousands of records, this can cause excessive calls (e.g. ~160,000),
leading to measurable overhead in workspaces.

By introducing a cache for quoteIdentifiersForSelect, redundant calls
are avoided, resulting in faster processing.

Review

  • Code review CR -1
    • Benni Mack -1
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 1

Review log 45

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

  2. Stefan Froemken commented on patch set 1 09/24/25, 10:06

    I'm pretty sure it will not be merged, but it helps to understand the problem. Appying this patch reduces query time on production ~300ms. We should try to prevent calling versionOL whereever possible.
  3. core-ci voted on patch set 1 V -1 09/24/25, 10:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85443

  4. Benni Mack commented on patch set 1 CR -1 09/24/25, 10:11

    Hey Stefan, this can be closed. I spent 2 weeks in July to find the problem here. The main issue with quoteIdentifier is that it's a bug in doctrine/dbal 3.9 (fixed in 3.10) and doctrine/dbal 4.2 (fixed in 4.3). See https://github.com/doctrine/dbal/pull/6926 There is currently a pending patch for v13 and v14 to allow doctrine/dbal 4.3 but there are some ongoing discussions between Stefan Buerk and Benjamin Franzke about htis. I fixed this by composer-patching all of my v13 installations and patch doctrine/dbal. Note: It affects ALL - literally - ALL DB queries that do quoting. It is a HUGE PITA, and just by composer-patching I won 2-3sec of loading time
  5. Georg Ringer abandoned the change 04/17/26, 19:53

    closing, should be solved