Closed (fixed)
Project:
CSSTidy
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2010 at 20:49 UTC
Updated:
8 Apr 2010 at 22:40 UTC
Curious to know what affect this module will have on performance? Does it slow down a site because there is extra processing or does it speed up a site because there is less to transmit?
Comments
Comment #1
philbar commentedThe extra processing is only done once, when the CSS file is aggregated and optimized, and not every time a visitor comes to your site. After it's cached by Drupal, there will be no processing by this module until the next time you modify your CSS or clear your sites cache.
The primary benefit is download speed for your site visitors, especially those with slow internet (dial-up or mobile) without the ability to receive the CSS file Gzipped.
Performance gain really depends on who wrote your stylesheet. If it someone that uses short-hand and combines properties, then it won't make a huge difference. The best thing is to just test (YSlow).
For example:
My CSS is 46.0K (9.1K gzipped) without CSSTidy, and 44.3K (8.6K gzipped) with CSSTidy. I pre-optimized my css with csscompressor.com before I wrote this module, so the improvement with CSSTidy isn't outstanding on my site. But even with that, there is a 3.7% difference without gzipping and 5.5% with gzip. Improvements with CSSTidy will be much better on your site.