Project

General

Profile

Actions

Feature #18852

closed

Speed up tslib_cObj->getTreeList by caching its results

Added by Ingo Renner over 16 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2008-05-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.0
Tags:
Complexity:
Sprint Focus:

Description

When extensions need to look up where their records are stored they use the startingpoint selector together with the recursion level selector. From these two parameters the method tslib_cObj->getTreeList() builds a comma separated list of page IDs where an extension should look for records.

The method does that by traversing the tree recursivly and issuing an SQL query for each page, depending on the recursion level set and the size of the tree this can result in an enormous number of SQL queries, time loss, and memory consumptions.

Solution:
create a cache table to store the results of tslib_cObj depending on the parameters the method was called with.
Now that the result is cached the cache also needs to be updated on certain events. These events are

  • create new page
  • move page
  • hide/unhide/delete a page
  • set/unset start/stop time for a page
  • set/unset php tree stop for a page
  • set/unset or change a FE group access restriction for a page

All these events would result in a different result for the getTreeList method, thus the cache must be cleared for these events. However for certain events we can find out which selected parts of the cache to delete and thus do not need to clear the whole cache.

Additionally the new cache will be cleared when clicking "clear all caches". The cache update mechanism is implemented as a hook that is now part of the cms system extension as it is related to pages and pages are part of the cms feature.
(issue imported from #M8515)


Files

8515.diff (26.9 KB) 8515.diff Administrator Admin, 2008-05-26 11:53

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #22412: cache_treelist is out of dateClosedDmitry Dulepov2010-04-10

Actions
Related to TYPO3 Core - Bug #22552: No cache entry in cache_treelist after endtime arrivedClosed2010-04-30

Actions
Related to TYPO3 Core - Bug #26161: cache_treelist is out of date when using starttimeClosed2011-04-21

Actions
Actions #1

Updated by Ingo Renner over 16 years ago

committed to SVN trunk

Actions

Also available in: Atom PDF