[TASK] Reduce SQL queries of page tree in workspaces 28/22528/7
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:02:25 +0000 (12:02 +0200)
commit37cd2d5084d48e77e17e8fb14ecbb5e55c7946c7
tree0dd44fecedf5685a6e0d0d7a9b765bc994fbd4ab
parent59cd61ea5ee76ddf3a7858d5adc66d3c6369e7bf
[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/22528
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-50349-ReduceSQLQueriesOfPageTreeInWorkspaces.rst [new file with mode: 0644]
typo3/sysext/workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php