Bug #76985
closedBackendUtility::getRecordTitle() method slows down system if record is localizable
0%
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
Updated by Markus Klein over 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.
Updated by Markus Klein over 8 years ago
- File cachegrind.jpg cachegrind.jpg added
Updated by Markus Klein over 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.
Updated by Markus Klein over 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.
Updated by Stephan Großberndt over 8 years ago
- Status changed from Needs Feedback to Resolved