Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2011 at 11:32 UTC
Updated:
16 Dec 2011 at 01:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeytown2 commentedThis has to do with how drupal_add_js/drupal_add_css works. You can get a better score on pagespeed by placing all files into one aggregate, but the issue with doing that is different pages load different css/js files, thus on page 2 of the users visit, you will get worse performance because the browser has to re-download a whole new css & js aggregate rather then the smaller aggregate that only changed. The bundler attempts to work around this issue by creating various bundles, each one being chosen fairly smartly so that instead of downloading a 200kb js file you only have to download a 20kb file on the 2nd page.
The reason why your getting a really bad score for CSS files is because the CSS Embedded Images module will double the number of CSS files; But it reduces the number of image files that need to be downloaded dramatically, so its a net win.
Things like this are all about trade offs. You can make a site that had really good perf stats according to the tools but you would then have to re-download just about everything on a different page of your site, because not all your pages are the same.
If you don't care about what I said and want a good score from pagespeed, disable the bundler sub-module. That will give you a better score, but then you have to download a new (large) aggregate on different parts of your website and already downloaded file reuse will be lower.
Comment #2
jvieille commentedThank you for your clear response.
What about setting or unsetting css / js optimization in core "Performance" page?
Comment #3
mikeytown2 commentedThat controls core's css/js aggregation which is no longer used, thus it's best to leave it disabled. If you go to the status report page
admin/reports/statusit will tell you various things about your current setup like you should disable your css / js optimization on the performance page.Comment #4
mikeytown2 commentedThis patch has been committed to the readme file.