[TYPO3-dev] TYPO3 4.5 performance session

Steffen Kamper info at sk-typo3.de
Sun Feb 13 22:51:35 CET 2011


Hi,

today i met Rupi and we did some profiling with TYPO3 4.5.
As FE page generation is nearly the same like in 4.4, we concentrated on BE.
The basic was usage of cachegrind, and we examined one initial load of 
the BE with about module. Further we examined pagetree and the list 
module with pid 0.

We found many issues and tried to break it down for possible solutions.

One main thing we examined are the ajax.php calls mainly for ExtDirect.
On initial BE load, there are 6 calls to ajax.php for the ExtDirect API. 
Each call is a single instance, which use init.php, and makes a complete 
init of a BE session including be_user init, localconf analysis (extMgm) 
and many other things. You can imagine that this takes time and resources.

So i had an idea to get rid of all of these ajax calls. They are only 
needed to generate the ExtDirect API for a given namespace, each 
namespace need a single instance.
My idea bases on a register function in pageRenderer for needed 
ExtDirect namespace. The API can be generated in php and can be included 
in render process of pageRenderer. This would mean: no request for 
namespace is needed, getting rid of 6+ requests.

Then we found some other issues, where i already created patches for.
jsMinify is called for each js script in BE that is included. This is 
mot needed at all, all scripts are processed from compressor anyway.
BErootline, mostly neaded for the viewonclick calculation, is called 
with anchor (list view). That means, if you have 20 content elements on 
page 2, the rootline is called with following uids:
2#421
2#845
2#666
a.s.o.
Unnecessary to mention that no cache entry will be used for each of 
them, as calculatet ident is different for each CE. So i made a patch to 
strip out anchor if present, and all of them use the cache.

One more finding, and very surprising, was the security token generation.
On first place of php used functions for external resources was fread, 
which happens in security token generation. Base is the function 
t3lib_div::generateRandomBytes which use
@fopen('/dev/urandom', 'rb')
MySQL was on place 4 here, i expected other ranking.

Rupi will research if there is an alternative way to generate random 
bytes, i will ask Helmut to look also for something.

We also examined CSH in user setupo, which behaves different as it 
should - there was new request on any hover on the next label.
It should be the case, that one request get all CSH for a specific file 
and hold it in memory, so you get one request for all CSH on one page 
(normally)

These are the findings so far, and i look forward to come with patches soon.

vg Steffen




More information about the TYPO3-dev mailing list