#107530Performance: Reduce calls to quoteIdentifiersForSelect
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
-
Gerrit Code Review pushed patch set 1 for main to change 90785 status
NewUnder Review <span data-processor="relativetime" data-value="2025-09-24T10:03:58+00:00" > 09/24/25, 10:03 </span> -
Oliver Hader changed target version <span data-processor="relativetime" data-value="2026-01-23T12:29:50+00:00" > 01/23/26, 12:29 </span>
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2026-03-31T09:05:27+00:00" > 03/31/26, 09:05 </span>
-
Georg Ringer commented and changed status
Under ReviewClosed <span data-processor="relativetime" data-value="2026-04-17T19:53:13+00:00" > 04/17/26, 19:53 </span>
imo solved