Percipient Studios logo

Performance Improvements

05 November 2013
Filed under: umbraco, ImageGen - by Douglas Robar

When we first wrote ImageGen it was only for Umbraco sites that would use the built-in Media section. The way Umbraco work, you never have more than a handful of images in any folder on the file system and usually only two. What we hadn't initially anticipated was that a number of users would instead have a folder of hundreds and thousands of images for a product database, or similar. In these cases ImageGen would become increasingly sluggish and use the server's cpu and memory for far too long. Not just when generating the resized images and saving them on the server to be re-used for the next request, but even when the cache was primed and returning 304 Not Modified responses to visitors.

Performance by the Numbers

As you can see, 2.5.7 didn't work well as the number of images in a folder increased. Depending on the server's capabilities the threshold at which performance degradation was seen varied from somewhere between about fifty and a few hundred images in a single folder. Beyond that point the server would suffer higher and higher loads.

ImageGen 2.9.0 has been reworked significantly for performance. Now, the response time with even a thousand images in a folder is better than any scenario with the older 2.5.7 version!


How to read the graphs

A COLD cache means that ImageGen must resize the original image, save it to the server's cached folder, and send it to the website visitor with a 200 OK response.

A WARM cache means that ImageGen has already got the proper image in the server's cached folder but the website visitor doesn't yet have a copy of it in his browser's cache. ImageGen find the appropriate image in the cached folder and sends it to the website visitor with a 200 OK response.

A 304 response happens when a website visitor has already got an image and is checking with the server to ensure the image on the server has not changed since it was last retrieved. ImageGen compares the image in the website visitor's browser with that in the server's cached folder (and also the original image from which the resized and cached image was created) and if they are the same sends the website visitor a 304 Not Changed response for the browser to show the image it already has rather than downloading it again from the website.

*ImageGen Professional can also cache images on the website visitor's browser to eliminate requests to the server entirely for instantaneous display.

Keep going and going

Extended testing is equally revealing of 2.9.0's enhanced performance!



It's All Free

That's right, server-side caching is free with ImageGen and always will be. Of course you get more features with ImageGen Professional but you don't need to pay to get essential functionality.

There's More!

Memory use has also dropped by up to 30%!

And... we're not done yet! There are still more performance gains to come.

0 comments for “Performance Improvements”

powered by <XSLTsearch>


Follow Us

RSS Feed
Follow us on Twitter
Follow us on Flickr