Project

General

Profile

Actions

Bug #76985

closed

BackendUtility::getRecordTitle() method slows down system if record is localizable

Added by André Wuttig almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-07-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
FormEngine
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

We detected that, if the TCA for a table is configured for localization like:

'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',

the getRecordTitle() of the TYPO3\CMS\Backend\Utility\BackendUtility class will be called very often while you edit a single record. We found out that this just happens if the record is enabled for localization.

The AbstractItemProvider is responsible for this behaviour. It calls some strange things in addItemsFromForeignTable() method.

In the end we can see that during the edit of one record the FormEngine makes getRecordTitle for each other record in the sysfolder or page where the single record is located.

If you have maybe 500 Records in this sysfolder and use label_userFunc this could lead to massive performance problems.


Files

cachegrind.jpg (26.5 KB) cachegrind.jpg Cachegrind results Markus Klein, 2016-07-12 11:06

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #77045: FormEngine extremely slow due to Doctrine changesClosedMorton Jonuschat2016-07-11

Actions
Actions #1

Updated by Markus Klein almost 8 years ago

  • Status changed from New to Accepted

Cachegrind analysis shows that indeed BackendUtility::getProcessedValue is called for all records on a page.
I can reproduce that.

Actions #3

Updated by Markus Klein almost 8 years ago

Research shows that l10n_parent is the culprit where all records of the default language are loaded.
Changing the TCA for model_news and model_links (in our case) to not use a select here, we can short the processing time by a factor 10.

Actions #4

Updated by Markus Klein almost 8 years ago

  • Status changed from Accepted to Needs Feedback

@Andrè: There is no way to fix this in Core, since the core's behaviour is perfectly fine. You need to change the TCA of l10n_parent to not list all possible parent records, which can be thousands.

Actions #5

Updated by André Wuttig almost 8 years ago

Thanks...i will try this.

Actions #6

Updated by André Wuttig over 7 years ago

It works. Thank you.

Actions #7

Updated by Stephan Großberndt over 7 years ago

  • Status changed from Needs Feedback to Resolved
Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF