Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Increase site speed

Go to End

6 Posts   1473 Views


Community Member, 151 Posts

5 February 2013 at 7:30am

Hi Everyone

We have just launched, and its working really nice - apart from the speed. We really need to improve page load times and optimise the image library.

Can anyone sign post me to ideas / guidelines. I think there is a lot of performance to be gained in the cache of cropped images that could be served as static image instead of having to pass through the GD library everytime (or is this already happening?).

Thanks in advance for any pointers!



Forum Moderator, 1899 Posts

6 February 2013 at 9:27am


Looks like a brochureware site - so - could be a huge win.

If you want to do a partial cache...

Then you have the more complicated server setup... APC, memcache, varnish (

Lastly, of course is analysing your site with something like kcachegrind and improving the code you have added :)


Community Member, 187 Posts

7 February 2013 at 1:08am

Images don't get passed through the GD library every time, only when they are first resized. It then checks if a resized image exists and serves it if it does.

I agree with Swaiba - partial caching & static publishing help a lot, partial caching alone recently saved us about 30% on loading times.


Community Member, 151 Posts

7 February 2013 at 1:20am

Thanks for this. Also applied these htaccess rules which have helped a lot...

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html "access plus 7 day"
  ExpiresByType text/js "access plus 7 day"
  ExpiresByType image/gif "access plus 7 day"
  ExpiresByType image/png "access plus 7 day"
  ExpiresByType image/jpg "access plus 7 day"
  ExpiresByType image/jpeg "access plus 7 day"
  ExpiresByType image/ico "access plus 7 day"
  ExpiresByType text/css "access plus 7 day"
  ExpiresByType text/javascript "access plus 7 day"
  ExpiresByType application/x-javascript "access plus 7 day"

<IfModule mod_deflate.c>
  SetOutputFilter DEFLATE
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  # Don't compress images, movies or zip files
  SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
  SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
  SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
  <IfModule mod_headers.c>
    # properly handle requests coming from behind proxies
    Header append Vary User-Agent

Will work on the partial cache soon, just need to work out what elements can be cached like that. Also setting up a varnish server as a test.

Thanks again


Community Member, 344 Posts

7 February 2013 at 4:50am

Edited: 07/02/2013 4:51am has a nice .htaccess file too.


Nobrainer Web

Community Member, 138 Posts

11 February 2013 at 11:14am

If you missed it, there is also a blog post about performance. I use that as guide for improving performance on sites:

And then i use to see where i should improve, and ofcourse also the showqueries=1 url param onsite.