Bug #81778
closedPerformance blocker calling @->getSchemaManager()->listTableColumns($tableName)@
100%
Description
I found a massive performance blocker in extbase due to the migration to doctrine: \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend->clearPageCache()
(which will be called for each inserted/updated/deleted Domain/Model
object) does this to determine if the table has a pid
column:
$columns = GeneralUtility::makeInstance(ConnectionPool::class) ->getConnectionForTable($tableName) ->getSchemaManager() ->listTableColumns($tableName); if (array_key_exists('pid', $columns)) {
Calling ->getSchemaManager()->listTableColumns($tableName)
is very costly, not only the column names but the whole information about the table including types and the like is fetched.
There are several places in the core where this is used to only iterate the available columns.
I propose to add at least a runtime cache so this information is not fetched during runtime for the same table over and over again.
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53391
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53391
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54087
Updated by Stephan Großberndt about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 20eeb0b31a986f15ae552944ba5ea7c70fd7038b.