0

My question is a rather simple one - I hope.

I'm doing a webshop, and the site was extremely slow, so I ran a plenty of page speed tests accessible online, like googles's page speed test and followed the advices they gave.

I did all the stuff that test suggested - css compress, image optimization, etc.

I got my webhost turn on deflate mod on the apache server too, for gzip compression, and for some reason, the server response time grew considerably after this.

Does anyone have any idea, whether the two might be connected, and if yes, what measures can I take to get the good resposnse time back? (it was okay before turning on the mod).

Thank you in advance!

Huba

1 Answers1

0

Surely the easiest test would be to turn it off again to see if that is the cause?

Mod_deflate compresses files, to reduce the sizes of the files, to reduce the amount of data that needs to be sent across the network (often the slowest part of web browsing). This should decrease network transfer times, but at the cost of compression processing time at the server end and decompression at the other end.

So yes it is possible as you are asking the server to do more work.

However in most cases, on modern hardware, the extra processing time is not noticeable - unless your server is extremely underpowered, extremely busy, or the resources your web server processes are extremely large.

When you say the server response time grew considerably can you give actually figures here? And also how much is server response time compared to the whole request? I.e. Did you benefit from this overall.

There are also some resources (primarily images and video) which are already compressed and compressing them again will gain nothing at processing cost. So need to check only the correct resources are being sent compressed. This should be easy to see in your browsers developer tools or online tools like webpagetest.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92
  • Hey! The page response time is - according to 4 online page speed tests avalable - between 1.2-1.4 secs. There are a couple of things that come to mind. Firstly, my front page is quite image-heavy, so you think, I should probably compress those beforhead and turn off image gzipping with deflate - is it possible at all? (sry, not an expert on apache). Secondly, do you think the fact, that it's a drupal site and the front page feature several views- database queries basically, as opposed to static content - influences the growth in response time brought about by turning on deflate? Thanks, btw! – Huba Gáspár Oct 23 '15 at 10:37
  • Images (jpeg, gif, png) are already precompressed so check they are not being served as gzip. If so your Apache setup is wrong. – Barry Pollard Oct 23 '15 at 11:59