Project

General

Profile

Actions

Bug #105054

open

Flexform migrations executed during schema generation is expensive

Added by Andreas Kienast 2 months ago. Updated 3 days ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-09-20
Due date:
% Done:

0%

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

Description

Scenario:

  • EXT:bootstrap_package is installed
  • A page contains 140 "Accordion" content element, each contains an empty item (=280 records)

Symptoms

If said page is opened in the "Page" module, loading the module is slow and needs roughly 4 seconds on a MacBook Pro M3, while running TYPO3 in ddev. The situation gets worse when the "Debug" preset is enabled, the loading time expands to 20-30 seconds.

Technical explanation

BackendLayoutRenderer makes use of RecordFactory, which in turn resolves the records and their relations. While creating Record objects, RecordFieldTransformer may hit on flexform fields (pi_flexform). This will invoke FlexFormSchemaFactory->createSchemataForFlexField(). This code path is expensive, as it will run online FlexForm migrations for the full TCA per content element.

If logging to the deprecation log is enabled (which is given by enabling the "Debug" preset), things get worse as each repetitive migration may trigger the same deprecations over and over again, resulting in writing 16 GB of data into the deprecation log per request.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #105075: Use RecordPropertyClosure for more field transformationsClosed2024-09-21

Actions
Actions #1

Updated by Andreas Kienast 2 months ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kienast 2 months ago

There's already a POC patch that introduces a cache for the flex schema generation: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86197

Actions #3

Updated by Gerrit Code Review 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86245

Actions #4

Updated by Benjamin Franzke 2 months ago

  • Related to Task #105075: Use RecordPropertyClosure for more field transformations added
Actions #5

Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86432

Actions #6

Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86432

Actions #7

Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86432

Actions #8

Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86432

Actions #9

Updated by Gerrit Code Review 3 days ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86432

Actions

Also available in: Atom PDF