[TYPO3-core] Taming the Performance in 6.2

Stefan Aebischer typo3 at pixtron.ch
Wed Nov 6 14:34:01 CET 2013

> 1) If you enable "Production Mode" (in the install tool, Preset
> Configuration) you expect the modules to load faster (due to no
> debugging code, no deprecation messages etc). But in fact the PHP
> processing of a module like Web>Page gets slower due to the overhead of
> concat+minify that seems to happen on every hit to the module and it
> might use up to 25% of CPU cycles of a normal Web>Page module rendering
> (PageRenderer::doConcatenate()). Caching? It seems that the culprid in
> the concatenate method itself is the isValidUrl call which is called on
> every file to merge and this calls the expensive idna_convert methods.

The merged files are in fact cached. But in order to calculate the checksum 
the expensive isValidUrl is called for every file which has to be merged.

As far as i can see, in BE all files are local files. In FE in most cases the minority 
of files will be remote files.
So it is quite expensive to check them all for being valid URL's. 

As a quick fix i propose to first check the filename with a less expensive Regex
before checking it with isValidUrl.
This resulted for me in a speedup of ~10% in the Page Module.

I created a gist with the proposed change, let me know what you think about.

More information about the TYPO3-team-core mailing list