I seemingly setup the module correctly, but I don't see much effect on css / js aggregation
For example, this test
http://www.webpagetest.org/result/110812_DY_1A50W/1/pagespeed/
tells
Combine external CSS (0/100)
Combine external JavaScript (33/10)

Should I expect better?
Shall css / js optimization in core "Performance" page be set or unset?

Thanks for advise

CommentFileSizeAuthor
#4 advagg-1247410-4.patch2.36 KBmikeytown2

Comments

mikeytown2’s picture

Title: No aggregation seem to occur » Question about number of bundles and tools like pagespeed.

This 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.

jvieille’s picture

Thank you for your clear response.

What about setting or unsetting css / js optimization in core "Performance" page?

mikeytown2’s picture

What about setting or unsetting css / js optimization in core "Performance" page?

That 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/status it will tell you various things about your current setup like you should disable your css / js optimization on the performance page.

mikeytown2’s picture

Version: 6.x-1.5 » 6.x-1.x-dev
Status: Active » Fixed
StatusFileSize
new2.36 KB

This patch has been committed to the readme file.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.