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

Vladimir Podkovanov admin at sitesfactory.ru
Mon Jan 17 22:17:30 CET 2011


Hi Ernesto!

On 17.01.2011 17:24, Ernesto Baschny [cron IT] wrote:
> Please share this "small script", should be easy to create an Upgrade
> Wizard out of it (its just one tiny function required, right?).
>
> We should include that at the same time than adding the md5 change. Else
> we'll never do it. Since RC1 is already scheduled for Wednesday, it
> should be done on these next days. Do you have the time to finish that up?

I've attached script I used, it is written as a scheduler task. I think 
some interface with progress bar needed to integrate it in Install Tool 
because script can take some time, 1 hour in my case with about million 
rows.

Moreover, now I'm not sure that converting is really needed :)
I've to check it again but seems that images are not being regenerated 
if hash changed.
I thought before that changing hash means file change and triggers image 
rebuild with obvious performance issue. But looks like rebuild depends 
only on image sizes (width, height) change!

So improper hash leads only to deleting that row with old hash and 
checking images sizes again (and writing new hash) and because the sizes 
the same rebuild is not triggered! (sizes are used in setup array which 
being used to generate md5 hash filename for temp image and if array the 
same we got same temp filename and so no rebuild).

I think checking image sizes should not take much time and we can 
suggest in Upgrade Wizard to just empty cache_imagesizes table and 
really this function already exists in Install Tool in Clean up :).
-- 
-rgds-
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110118/ad17e78a/attachment-0001.htm>


More information about the TYPO3-team-core mailing list