Issue Task Closed

#107530Performance: Reduce calls to quoteIdentifiersForSelect

Stefan Froemken 09/24/25, 09:54 updated 04/17/26, 19:53

Description

Hi,

when working with workspaces each record will be processed by PageRepository::versionOL(). This needs around 0,0028 – 0,0034 seconds. Unforgenably, unfor…, damn unfortunately “purgeComputedProperties” uses array_keys of $row instead of “*”:

        // implode(',',array_keys($row)) = Using fields from original record to make
        // sure no additional fields are selected. This is best for eg. getPageOverlay()
        // Computed properties are excluded since those would lead to SQL errors.
        $fields = array_keys($this->purgeComputedProperties($row));

That results into a lot of QueryBuilder::quoteIdentifier() calls. With extended pages-records the amount of column can increase up to 80 or more. With 2000 calls to versionOL we got 160.000 calls to quoteIdentifier.

I debugged that with XHGUI:

TYPO3\CMS\Core\Database\Query\QueryBuilder::quoteIdentifiersForSe…
count   self        inc.
7823     303,724 µs     1,593,437 µs

I have implemented a cache for that, which reduzes the wall time to 95ms

Reviews 2

History 34

  1. Georg Ringer commented and changed status Under Review Closed <span data-processor="relativetime" data-value="2026-04-17T19:53:13+00:00" > 04/17/26, 19:53 </span>

    imo solved