Add cache for category fields in TCA
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 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)