the function image_display() will regenerate every viewed image whenever the image settings are updated.
The variable "image_updated" is set to the current time whenever the image settings page is submitted - even if the values do not change. This will cause the unnecessary rebuild of every image when viewed - and this may be the cause of some of the complaints of image pages running slow.
(note: it will only happen once per image until the next time the settings are saved)
I think that there should be a better way to flag image rebuilds. If the admin changes the dimensions of the thumbnail or preview then there should be an option to rebuild existing images and that would take place when the administrator initiates it, not when the page is viewed by a normal visit. And if the settings for "Allow users to view original image" or "Images per page" change then the rebuild need not take place at all.
Perhaps the reubuild can be done by gallery, allowing for various dimensions per gallery within a single site.
I will help with the coding/testing: what are some other thoughts?
thanks
- jim
Comments
Comment #1
walkah commentedthis is a good (and absolutely correct) analysis of how image.module determines whether or not to regenerate derivatives. the question is - there is little else on the settings page ... i.e. if the settings are saved, it's a pretty safe bet that the dimensions were changed... and while it's true some derivatives may be needlessly re-generated - it's only done once per save... how frequently do you alter derivative sizes?
i like your idea of having per-gallery derivatives... but i thnk that's a separate issue.
marking this by design.
Comment #2
jsloan commented... no problem, I'll re-submit as a feature request.
Comment #3
drewish commentedThis version is no longer supported. If this issue is occurring with a more recent version please open a new issue.