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

JoH asenau info at cybercraft.de
Wed Sep 30 12:47:54 CEST 2009


>> So let's see which options we've got so far:
>> 1 different mtime => same content or different content
>> 2 different mtime => same size or different size
>> 3 different size => different mtime and (different content or same
>> content) 4 different content => different mtime and (different size
>> or same size)
>>
>> Since we want to avoid 4 the only way to go seems to be 3, since 1
>> and 2 might lead to a performance loss.
>
> I'm either dumb or still lack coffee at this time of day. I don't get
> what's left and right of the arrow.
>
> So I probably just phrase 3 in other words:
>
> If the size differs it's clear that the content has changed.
> If only the mtime changed the content could have changed.
> In this case we *could* check the md5 hash to be sure.

If you change "could check" to "must check", I agree :-)

if(mtime changed) {
    if(size changed) {
        make new image
    } else if (content changed) {
        make new image
    } else {
        do nothing
    }
} else {
    do nothing
}

should work as described

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
TYPO3 workshops: http://workshops.eqony.com




More information about the TYPO3-performance mailing list