Bug #99244
closedDataMapper uses a lot of memory when retrieving MM-relations in workspaces
100%
Description
For example in the EXT:news domain model. The getCategories() method of the news domain model uses a lot of memory when previewing a page with news records. More precisely this happens when there are a lot of categorized news records. The cause seems to be TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getConstraint(). Without workspaces the resulting constraint within a getCategories() call will be "uid_foreign = $newsUid" (line 532). But in workspaces the relation IDs get resolved in another manner (line 498) and will then be used in the constraint "uid_local IN ($categoryUids)" (line 505).
So in the first case all categories of a news are retrieved. In the second case all relations to the categories of the actual news are retrieved. So something completely different. Let's say we have 20000 news records and all share the same 3 categories. Without workspaces the query will return 3 records. Inside of a workspace this query will return 60000 records or even more in case of workspace versions of news. The output in the preview seems correct in both cases so I guess the obsolete records get sorted out at a later stage.
Is the behavior of TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getConstraint() intended or buggy?
Updated by Rémy DANIEL over 1 year ago
- Complexity set to hard
- Is Regression set to Yes
Reproduced in TYPO3 11
Introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913
I will submit a patch for review
Updated by Gerrit Code Review over 1 year 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/+/81166
Updated by Markus Klein over 1 year ago
- Related to Bug #82750: Workspace preview doesn't preview MM relations properly added
Updated by Gerrit Code Review over 1 year 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/+/81166
Updated by Rémy DANIEL over 1 year ago
- TYPO3 Version changed from 10 to 11
- PHP Version changed from 7.4 to 8.2
Updated by Gerrit Code Review 7 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/+/81166
Updated by Gerrit Code Review 3 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/+/81166
Updated by Benni Mack 2 months ago
- Related to Bug #88021: Preview of a record related with FAL does not work when file is changed in a workspace added
Updated by Benni Mack 2 months ago
- Related to Bug #82086: Frontend Preview Mode And Missing Inline Elements in Workspace added
Updated by Benni Mack 2 months ago
- Related to Bug #76993: Getting a single extbase query result in a workspace for a relation that has been deleted and re-added returns no relation added
Updated by Gerrit Code Review about 2 months 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/+/81166
Updated by Gerrit Code Review about 2 months ago
Patch set 6 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/+/81166
Updated by Gerrit Code Review about 2 months ago
Patch set 7 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/+/81166
Updated by Gerrit Code Review about 2 months ago
Patch set 8 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/+/81166
Updated by Gerrit Code Review about 1 month ago
Patch set 9 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/+/81166
Updated by Gerrit Code Review about 1 month ago
Patch set 10 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/+/81166
Updated by Gerrit Code Review about 1 month ago
Patch set 11 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/+/81166
Updated by Gerrit Code Review 12 days ago
Patch set 12 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/+/81166
Updated by Stefan Bürk 12 days ago
- Related to Task #57169: Invalid relations of MM records in workspaces added
Updated by Gerrit Code Review 12 days ago
Patch set 13 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/+/81166
Updated by Gerrit Code Review 12 days ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87626
Updated by Gerrit Code Review 12 days ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87627
Updated by Rémy DANIEL 12 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1d976dbc82caf4d53878d7bab23d42da46af9237.