Project

General

Profile

Actions

Feature #90398

closed

Add cache for category fields in TCA

Added by Christoph Lehmann almost 5 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2020-02-16
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The category tree is build on every request for every category field in TCA when you open a categorized record.

For 700 categories without any filter like rootUid this means 700 sql queries to build a category tree.

On the client site you may not notice it because the tree is fetched via Ajax.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #78905: TCA tree: Simplify json resultClosed2016-12-07

Actions
Actions #1

Updated by Christoph Lehmann almost 5 years ago

I digged a little bit deeper into it. There are many funny comments in TYPO3.CMS/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php and i came to the conclusion that it needs a more complex refactoring to simplify building the category tree and use a cache

Currently it's like this

1. Collect all categories and build tree, but only safe the ids (1st SQL per category)
2. Parse the tree and make sure editors have read permissions to the categories (\TYPO3\CMS\Backend\Security\CategoryPermissionsAspect)
3. Parse the tree and build the final tree items with workspace overlay (2st SQL per category)

Actions #2

Updated by Christoph Lehmann almost 5 years ago

  • Related to Task #78905: TCA tree: Simplify json result added
Actions #3

Updated by Benni Mack about 2 years ago

Hey Christoph,

thanks for the bug report. I fixed this here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76443

I went down with 1700 categories from 8516 SQL queries to 21 (with workspace overlays).

Actions #4

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

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/+/76443

Actions #5

Updated by Gerrit Code Review about 2 years 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/+/76443

Actions #6

Updated by Gerrit Code Review about 2 years 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/+/76443

Actions #7

Updated by Gerrit Code Review about 2 years 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/+/76443

Actions #8

Updated by Gerrit Code Review about 2 years 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/+/76443

Actions #9

Updated by Gerrit Code Review about 2 years 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/+/76443

Actions #10

Updated by Gerrit Code Review about 2 years ago

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

Actions #11

Updated by Benni Mack about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Resolved to Under Review

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

Actions #13

Updated by Benni Mack about 2 years ago

  • Status changed from Under Review to Resolved
Actions #14

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF