Project

General

Profile

Actions

Bug #99244

open

DataMapper uses a lot of memory when retrieving MM-relations in workspaces

Added by Hannes Bochmann about 2 years ago. Updated 16 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2022-12-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
hard
Is Regression:
Yes
Sprint Focus:

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?


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #82750: Workspace preview doesn't preview MM relations properlyClosed2017-10-12

Actions
Related to TYPO3 Core - Bug #88021: Preview of a record related with FAL does not work when file is changed in a workspaceClosed2019-03-27

Actions
Related to TYPO3 Core - Bug #82086: Frontend Preview Mode And Missing Inline Elements in WorkspaceClosed2017-08-11

Actions
Related to TYPO3 Core - Bug #76993: Getting a single extbase query result in a workspace for a relation that has been deleted and re-added returns no relationClosed2016-07-08

Actions
Actions

Also available in: Atom PDF