[TASK] Reduce SQL queries of page tree in workspaces 25/41425/3
authorNicole Cordes <typo3@cordes.co>
Wed, 15 Jul 2015 19:22:00 +0000 (21:22 +0200)
committerNicole Cordes <typo3@cordes.co>
Thu, 16 Jul 2015 10:21:04 +0000 (12:21 +0200)
commitd2c4bbbb34ffe31ad2007573158819b3ce4aee65
tree886bca0007f07ffd14cd7212ede7949e0caf3674
parent57ba6d36031372bd591a5cac123a37f9cc42d864
[TASK] Reduce SQL queries of page tree in workspaces

Nodes of the page tree are highlighted, if that particular node
has versioned elements in the current workspace. However, this is
determined by iterating over all tables and all records for each
page. If having installed many extensions with many tables and
many records, this will produce a lot of SQL queries.

This patch introduces a new cache for record versions per page which is
fetched once from the database. This cache is located within the
\TYPO3\CMS\Workspaces\Service\WorkspaceService and can be shared between
several other classes as this is implements a SingletonInterface.

Resolves: #50349
Resolves: #66231
Related: #61184
Releases: master, 6.2
Change-Id: Ibaef07bdab87147c6826af8578870c52803dfe03
Reviewed-on: http://review.typo3.org/41425
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php