This was observed on 4.7. The code is the same for 5.x, so it really does not matter which version you are using.

When having the custom size options enabled, img_assist generates derivatives for every page view of a node that contains img_assist tags. This leads to a lot of node_load, and more importantly, DELETEs of the existing derivatives from the files table.

This causes severe contention even on a moderately busy site.

For more details see here Site slow because of img_assist module and how to solve it.

I have no patch for this, but the workaround is to disable these settings.

Comments

owen barton’s picture

Nice find....subscribing

sun’s picture

I don't like the whole approach of Image/Image Assist to create custom derivatives on its own. Both modules should use Imagecache to create any derivative sizes. Although this would implicit create a hard dependency on Imagecache module on all sites, we additionally would not have to deal with issues like Arbitrary images disappear.

My vote is to replace all of that code with an Imagecache integration. However, I'd like to hear others' votes in front of actually doing something.

drewish’s picture

i'm not convinced that imagecache is the way to go. i've been working on improving the derivative generation in the image module. for the 5.x-2.x branch i want to make it easier for other modules like img_assist to programatically add sizes.

zoo33’s picture

We had a talk on IRC today about this and we'd really like to get rid of all image manipulating functions from Image assist. It should really rely on other modules to do that kind of work.

@drewish: Could the image size api you're planning for also handle situations like this one, where an arbitrary pixel size is created for an arbitrary single image?

johnalbin’s picture

Another work around is to configure the module to insert images as HTML rather than as img_assist input filter tags.

Subscribing.

sun’s picture

Warning: Using HTML output instead of the filter tag might be a workaround for this issue but might lead to issues like this. I actually plan to make the whole HTML output feature into a configurable option in img_assist's settings, which will be disabled by default.

mariagwyn’s picture

(original post: http://drupal.org/node/194551)
I am upgrading, and now running:
Drupal 5.6,
Image 5.x-2.x-dev and
Image Assist 5.x-1.x-dev
When I originally installed image assist, I used the html input rather than the image assist filter. I am in the process of updating all my code so it reflects the filter rather than html, which I have done by manually updating the table (it is field in a unique content type). However, two problems, the first being much more serious:

1. When I insert an image using image assist, it creates the following image source code:
"http://mariagwyn.com/snqclean/system/files/images/malex.img_assist_custo...." (I am using the private download method). Note if you put this into your browser, you will get a 'page not found' error. HOWEVER, if I remove 'img_assist_custom' from the source, you will see the original image, malex.jpg. If I remove this bit from the node, the image also appears, appropriately re-sized. What makes this very strange is that if I look in the files folder itself, I see two images which I presume are created by image assist: "malex.img_assist_custom.jpg" and "malex.img_assist_properties.jpg." They just don't seem to show up at all.

2. Zoo33 suggested that this may be a problem in my file system, but when I upload an image using the image module, I don't have a problem.

So...

3. Suggestion: is it possible to remove all custom resizing functions, and let the custom size area of the form be used to simply resize the selected image via html rather than actually resize the file? I realize that this means that larger images are downloaded than the user may see, but it allows for custom sizes on a node. I use image_assist for an online journal, and we cannot always predict the size of image needed in a given article. Resizing on the fly is very helpful, even if it is only a visual resize, not a newly generated image file.

Thanks,
Maria

Leeteq’s picture

Subscribing.

ManyNancy’s picture

I'm curious if this is still applicable.