Project

General

Profile

Actions

Bug #101121

open

Poor performance with INLINE + children having "label_alt" being set to a relation (n:1) column

Added by Jan Kornblum 11 months ago. Updated 5 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2023-06-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
inline, label_alt, performance, tca
Complexity:
Is Regression:
Sprint Focus:

Description

I've noticed massive performance issues with INLINE relations when childrens have "label_alt" set to fields which are relations (n:1) themselves. Current scenario is:

  • There are 400 "seminars", 4.000 "events", 20 "locations".
  • Database layout is "seminars" <1:n> "event" <n:1> "location.
  • TCA form for "seminar" contains "events" defined as INLINE, and "event" contains "location" as SELECT SINGLE.
  • Table "event" has "label_alt => date, location, seminar" set (last two are n:1 relations).

Now opening the backend edit form for a "seminar" (which contains ~ 100 inline "events") leads to a never ending request on live system ("gateway timeout" on DDEV local). On database level, nothing could be improved by setting additional indices for all relationĂ¡l columns. As soon as "label_alt" is removed, there are no performance issues. In addition, this only happens when used within an INLINE relation. In plain list view for "event", this "label_alt" setting containing relations doesn't cause any problems.

I stumbled across this issue several times in the past. As far as is remember it always happens when "label_alt" refers to relations in combination with INLINE usage. I suppose the database queries in behind are not really good and perhaps they simply deal wrong with relations or don't use plain left joins ("event" <n:1> "location").

The only way i could work around this was, to use a custom label user function for the "event" label, which does "BackendUtility::getRecord()" for "location" and "seminar" in behind. So the 100 inline records themselves are not the problem and in general, we are not talking about a huge amount of records at all.

Actions #1

Updated by Gerrit Code Review 6 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/+/81871

Actions #2

Updated by Gerrit Code Review 6 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/+/81871

Actions #3

Updated by Gerrit Code Review 5 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/+/81871

Actions #4

Updated by Gerrit Code Review 5 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/+/81871

Actions

Also available in: Atom PDF