[TYPO3-performance] TS-Rendering - IMG_RESOURCE - 622 ms - Solution

Steffen Kamper info at sk-typo3.de
Mon Sep 28 18:23:50 CEST 2009

Hi Rupi,

Rupert Germann schrieb:
> hey,
> thanks masi for pointing me to this thread.
> I did some benchmarks comparing execution times for md5_file() and 
> filemtime()+filemsize() for different filesizes. the results for a call 
> to getCachedImageDimensions() with either md5_file or filemtime+filesize 
> are listed, too.

> the bigger the file is, the more gain we have from using filemtime() and 
> filesize() instead of md5_file().
> find the patch attached which I used to get these results.
> The question is: are we really shure that this works as reliable as with 
> hashing the complete file?

i would say - yes. If original file change, it forces new image 
creation, otherwise it use the cached one.

The benefit is great, as for FE this is executed for page generation, so 
i would say: go for it ;)

vg Steffen

More information about the TYPO3-performance mailing list