Project

General

Profile

Actions

Bug #81778

closed

Performance blocker calling @->getSchemaManager()->listTableColumns($tableName)@

Added by Stephan Großberndt over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2017-07-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Stephan Großberndt about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF