Feature #90398
closedAdd cache for category fields in TCA
100%
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.
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)
Updated by Christoph Lehmann almost 5 years ago
- Related to Task #78905: TCA tree: Simplify json result added
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).
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
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
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
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
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
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
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
Updated by Benni Mack about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 971be9000b455391c314cfee251f8b3fe254008e.
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
Updated by Benni Mack about 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset bdeeb0cf96a9f86eeaf60db8f8beafc26718978c.
Updated by Benni Mack almost 2 years ago
- Status changed from Resolved to Closed