[TYPO3-core] RFC: Performance enhancements in BE, part 1

Michael Stucki michael at typo3.org
Fri Jul 6 22:27:29 CEST 2007


Hi Dmitry,

> Problem: dummy BE module with no code at all takes 1 second to load. I
> started profiling and found that some functions do not process data
> effectively. One of the most time consuming is
> t3lib_extMgm::addToAllTCAtypes(). It loops over "types" array even if
> there is no need for it and calls trim() several times on the same
> variable. Though it all takes milliseconds, it is still 30% of all time
> in request. I do not think it is acceptable. // Another time consuming
> function is t3lib_div:loadTCA(). I could optimize it too by using
> shortcuts to inside of TCA array. // Time numbers were 134 and 108ms for
> extMgm and t3lib_div, now they are 32 and 44ms. This is not a big change
> but these are the most time consuming functions, they take more than
> INSERT/UPDATE calls to MySQL! The more extensions are installed, the
> more time these functions take.
> 
> Solution: optimize function to skip loop when it is not necessary and
> use shortcuts to TCA array. Patches are supplied separately.

Hmm, I dislike having different issues inside one RFC. So here is the reply
about the t3lib_div::loadTCA() patch:

Generally, makes sense! What I dislike is this:

+       $tca = &$TCA[$table];
+       if (!$tca['columns']) {
+               $dcf = $tca['ctrl']['dynamicConfigFile'];

Get rid off $tca and apply the reference on $dcf instead.

(...or was this the reason why it became faster?)

> I am going to continue investigation and find other weak places.

Great! So +1 for this change...

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list