[TYPO3-core] RFC: #8515: Speed up tslib_cObj->getTreeList by caching its results

Ingo Renner ingo at typo3.org
Mon Jul 14 10:21:25 CEST 2008


Peter Niederlag wrote:

Hi Peter,

> I don't have any site running where tslib_piBase->pi_getPidList whould
> run one more than maximal five pages. So I don't expect any reasonable
> gain from this patch. in 99% percent of cases it just operates on a
> single(!) page, where the records are stored.

Not in the (special) case of indexed_search. IS always runs through the 
whole tree beginning at the root. This patch will save you n-1 queries 
for every site. (where n is the number of pages in the tree beginning at 
the root)

> Instead I end up with a bunch of hooks running on a couple of BE-operations.

The cache updater uses the hooks in TCEmain to keep TCEmain clean from 
extension code ("cms" is the extension here).

> Are there really many setups that would benefit from a cache for
> ->getTreeList()? Is ->getTreeList() used anywhere else than for plugins?

yes, basically every extension. Even in the scenario you mentioned above 
it would save 4 queries.

> I am not against it at all but would really like to see a thorough
> analysis of the performance-impacts for different situations.


Have a look at a corresponding thread in typo3.dev for more numbers: 
http://support.typo3.org/general/dev/m/re-typo3-dev-sphinx-for-indexed-search-340973/p/226/ 



best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-team-core mailing list