[Typo3-dev] Higher parsetime in 3.8.0

Peter Niederlag niederlag at ikd01.de
Mon Aug 29 20:30:41 CEST 2005


Hi,

Simon Ihmig schrieb:
> Simon Ihmig schrieb:
[...]
> To "/Parse template":
> Within this section the function t3lib_TStemplate->start() is called by
> tslib_fe->getConfigArray(). It builds the TS array, which is obviously
> also needed by the USER_INT, however caching should allow for low overhead.
> 
> Profiling revealed that most of the time is consumed by the following
> parts:
> A: invoke runThroughTemplates() - took 33ms
> B: invoke getHash() - took 7ms
> C: unserialize the cached TS - took 12ms
> D: cache_pagesection is written - took 3ms
> 
> The mentioned parsetimes are based on a rather complex site, with a lot
> of extension etc., so maybe C can be optimized by simplifying the TS
> code like Joey suggested.
> 
> This might be untrue as I am not so involved into the T3 core, but I
> feel that A might be a real design flaw.
> 
> When you look at runThroughTemplates() it seems to look for templates in
> the rootline, and calls processTemplate() for every template found,
> which recursively calls itself for other templates that are beeing
> included.
> 
> So basically it fetches all the used templates from the database. And if
> you have splitted up a complex website into many templates, for the sake
> of readability and reusability, which is a good thing to do IMHO (!),

Not just a good thing but also even required(!) imho if you are
co-working templating on a site!

> this might lead to some 20 database calls or so!
> 
> So the question goes to some T3 insider: is there any need for this
> whole process? I see that the actual TS code is fetched later from
> cache, but there are still those many database operations before by
> calling runThroughTemplates().

[...]
Without looking into the function:

In my opinion it must be possible to cut down the 20 DB-calls. sql-wise
this shouldn't be a problem. But due to the complex dependeny handling
of the templates I guess it would probably require some smart
array_multisort or similar action?

Cheers,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.typo3partner.net * professional services network *




More information about the TYPO3-dev mailing list