[TYPO3-core] Taming the Performance in 6.2

bernd wilke t3ng at bernd-wilke.net
Tue Nov 12 11:41:40 CET 2013


Am 12.11.13 10:32, schrieb Dmitry Dulepov:
> Hi!
>
> Mathias Schreiber wrote:
>> currently we spend about 3% of a fully cached call on "file_exists".
>> I don't really consider this "cheap" but luckily that's why it's
>> opinions :)
>
> I profiled the following cases:
> - file exists + file_exists + require_once
> - file does not exist + file_exists + require_once
> - file exists + @include_file
> - file does not exist + @include_file
>
> Each test was run 10000 times, all existing files and non-existing file
> names were unique to prevent FS caching and simulate unique class files.
>
> Results from slowest to fastest with self cost the equals sign:
> - file exists + file_exists + require_once = 13.04
> - file exists + @include_once = 12.10
> - file does not exist + @include_once = 8.30
> - file does not exist + file_exists + require_once = 2.77
>
> So having file_exists does not make much difference when the file really
> exists and speeds up the whole thing if the file does not exist.
>
> Conclusion: no need to get rid of file_exists.
>
> Test code is here: http://pastebin.com/mC51SNvL
>

questions which come to mind:

is require_once() timing the same as include_once() ?

how often is an existing file included and how often a non existing 
_in_TYPO3_?

how is the timing if a file already is included?
how often are files more than once requested to include_once() _in_TYPO3_?

how does the size of the included file change the timing?
which filesize is usual in TYPO3?


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-team-core mailing list