Feature #90398

Add cache for category fields in TCA

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

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

0%

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

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

Actions
#1

Updated by Christoph Lehmann almost 2 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)

#2

Updated by Christoph Lehmann almost 2 years ago

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

Also available in: Atom PDF