[TYPO3-core] RFC #12232: Bug: md5_file() to check if a file has been changed is very expensive [performance]

André Stösel andre at stoesel.de
Mon Oct 4 14:27:31 CEST 2010


> Could you back this up with some (collected) data? Can you prove that
> your patch provides a better performance?

Someone did some tests before:
http://lists.netfielders.de/pipermail/typo3-performance/2009-September/000264.html

And I did some test today, too.
As you can see, the new version of this function with the same behavior
is insignificantly slower than the old one. But if you have a lot of
big files and switch to the check without md5_file, the runtime is
proportional to the count of files and isn't affect by the filesize.


old = old-function
new_old = new function old behavior (md5_file)
new_new = new function new behavior (avoid md5_file)

1.5M png - 100 cycles
 old:     751.2 ms
 new_old: 757.7 ms
 new_new:  33.9 ms

200K png - 100 cycles
 old:     135.5 ms
 new_old: 138.5 ms
 new_new:  33.9 ms

20K png - 200 cycles
 old:      97.6 ms
 new_old: 102.6 ms
 new_new:  68.1 ms


40K png - 200 cycles
 old:     120.1 ms
 new_old: 128.4 ms
 new_new:  68.0 ms

800K png - 100 cycles
 old:     435.7 ms
 new_old: 432.0 ms
 new_new:  33.8 ms


More information about the TYPO3-team-core mailing list