[TYPO3-Performance] General questions

Mathias Schreiber [TYPO3] mathias at typo3.org
Tue Aug 5 13:55:28 CEST 2008


Martin Kutschker schrieb:
> Mathias Schreiber [TYPO3] schrieb:
>> t3lib_page->getRootline ist something that could be improved massively.
> 
> 4.2 has a rootline cache and I have an even more improved version of the
> caching mechanism (local for a script run).

Ok, so let's see what happens:
class.t3lib_page.php
Line 548: $uid (4711) is sent into the function
Line 570: $uid = intval($uid); <- ERROR, see below
Line 572: Does loop until $uid is 0
Line 590: $uid = $row['pid'] <- has to result in $uid being 0 sometime
Line 664: $this->cache_getRootLine[$uid]... = $output;

Line 664 rips off the whole caching since it will ALWAYS cache $uid = 0.
get the point?
Cache is good, this implementation is bu....it (sorry for the hard 
words, but it's true).

Solution: change line 570 to something like $uid_local = intval($uid); 
and use this var from there on.

See the problem?
What use is a cache that overwrites itself every time?

> Ingo has suggested a global rootline tree cache for 4.3.

Ingo, this one is being generated when the page is being inserted in the BE?
If so: Thumbs up!

-- 
T3A AM
Rocking TYPO3 since 3.1b1


More information about the TYPO3-Performance mailing list