Actions
Task #90419
closedImprove performance of DatabaseRecordList->generateList()
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2020-02-18
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
When checking if there are any rows to render, a DB query fetches the uids of all records instead of only one. This leads to perceptible bad performance of the backend list view with >100k rows.
File in current master:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
Current:
$firstRow = $queryBuilder->select('uid')
->from($tableName)
->execute()
->fetch();
Could be:
$firstRow = $queryBuilder->select('uid')
->from($tableName)
->setMaxResults(1)
->execute()
->fetch();
This behavior exists at least since TYPO3 8.
Backports to version 9 and 8 are similarly easy changes, but e.g. the code for TYPO3 8 recides in AbstractDatabaseRecordList.
Actions