[TYPO3-core] Taming the Performance in 6.2

Dmitry Dulepov dmitry.dulepov at gmail.com
Tue Nov 12 10:32:28 CET 2013


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

-- 
Dmitry Dulepov

Today is a good day to have a good day.


More information about the TYPO3-team-core mailing list