After a long hiatus, I just tried latest advagg with my Drupal7 site, and it's working quite nicely across the board.

Great work!

Can you comment a bit as to the interaction of AdvAgg with -- or more importantly, "against" -- LabJS and Google's PageSpeed webserver module?

Should we just be using AdvAgg alone? Is there any anvantage to additionally keeping LabJS/PageSpeed in place? Looks like they do some of the same stuff.

If there's some value to using multiple tools because there's not 100% overlap, what are the things we should let each piece do?

I've found some old comments in here so far ... but all the parts have been under development, and have changed. Hoping to get an up-to-date refresh of what's what.

Comments

mikeytown2’s picture

In theory you can use all 3 and they won't step on each other. First thing would be to configure mod_pagespeed so that the CSS & JS filters are disabled as this is being handled by AdvAgg.
ModPagespeedDisableFilters combine_css
https://developers.google.com/speed/pagespeed/module/config_filters

LABjs and AdvAgg should work together once this patch has been applied #1990358: AdvAgg & LABjs: Javascript errors when JS files are scoped to load in the footer and expect required variables to be defined earlier

If you don't want to use LABjs you can get a similar affect by enabling the AdvAgg_mod module and enabling the "Add the defer tag to all script tags" option.

ano.nimmus’s picture

> won't step on each other

Do you mean won't br functionally redundant, wasting CPU? or just won't destructively conflict?

> configure mod_pagespeed so that the CSS & JS filters are disabled

You mention only one filter to disable, but there are two specifically for combining/aggregating:

pagespeed DisableFilters combine_css;
pagespeed DisableFilters combine_javascript;

Did you intend only the one, or both?

Also, @ https://developers.google.com/speed/pagespeed/module/filters

there are numerous other JS filters. E.g., inlining, minification, etc.

There's gotta be some more overlap ... what I don't yet get is which ones they really are, and whether it's "better" for any of the overlap do be done in Pagespeed or AdvAgg.

> If you don't want to use LABjs you can get a similar affect by enabling the AdvAgg_mod module

I've really got no educated preference. Is there some benefit to using one or the other? Or is "similar" == "same"?

Are the AdvAgg patchtes already in a DL of the -dev version?

ano.nimmus’s picture

Doing some testing, I enabled AdvAgg, & disabled:

pagespeed DisableFilters combine_css;
pagespeed DisableFilters combine_javascript;

Now a check with PageSpeed insights reports:

Compressing the following resources with gzip could reduce their transfer size by 153.6KiB (68% reduction).

    Compressing https://dev.loc/sites/default/files/advagg_js/js__p1Qpss6rxx61TkVeoNFSUNbP9o7yRObuEEA6oHYHd9g__Y1A0qRz83rhH7oPWVty4vUeBGcN-HReTOEdJ7v64cEI__kldQmnFP9uDHwwwiq8adKRLYGDz3vrGxFXmA_tPtUFw.js could save 64.8KiB (64% reduction).
    Compressing https://dev.loc/sites/default/files/advagg_js/js__QsCwX7XgcIL-Xa-aFFSL3pmjIB4STfX-d3P8LfVVXe4__Cnmu39dBxbTivbm-SmnflfZFGRIMYDsw8TnQ3W4eKiw__kldQmnFP9uDHwwwiq8adKRLYGDz3vrGxFXmA_tPtUFw.js could save 44.9KiB (74% reduction).
    Compressing https://dev.loc/sites/default/files/advagg_js/js__JIv9DH0Dbfc6H1j-GuCAvGlTCTJiQeWngf8u8JD_Hdg__uovopJPnz11gw7W0bvWxCBGapcN5PnhReSh52au-iOk__kldQmnFP9uDHwwwiq8adKRLYGDz3vrGxFXmA_tPtUFw.js could save 30.9KiB (74% reduction).
    Compressing https://dev.loc/sites/default/files/advagg_js/js__D8JhA7_kSDkPf0ovet0jLBwhcWXPc-Iy1sc7DXowLIA__ewOYbFyUiMl-pQAXDNOvol0B-4P0TgDJ3bieIpqZATY__kldQmnFP9uDHwwwiq8adKRLYGDz3vrGxFXmA_tPtUFw.js could save 5.2KiB (61% reduction).
    Compressing https://dev.loc/sites/all/modules/contrib/labjs/labjs.min.js?n01fgv could save 3.2KiB (58% reduction).

I have nginx out front doing gzip compression for everythig; and headers show that it IS for everything OTHER than the files listed above.

If I reenable the pagespeed filters, the reduntanly pagespeed-ified AdvAgg js/cs are properly compressed.

Not sure why those files aren't getting compressed.

mikeytown2’s picture

Do you have the AdvAgg CSS/JS Compression modules enabled and configured to compress?

ano.nimmus’s picture

I'd tried both ways ... to no avail. I never got the pieces to completely work, either individually or together.

In the end, I ended up removing both pagespeed & advagg.

Pagespeed is, imo, a nice idea, but creates a mess in conjunction with my Drupal stack. It breaks often in subtle ways which are hard to track down, and often harder to eliminate.

AdvAgg by itself -- without Varnish in the loop -- works well enough. But with Varnish, and bugs in Purge, it misbehaves for me too often.

Relying on just the combination of Drupal's core aggregation, labjs & varnish seems to be giving me the best performance I've tested so far, and is quite stable & bug-free for me.

The two particular feature that I don't get that I sort-of miss are, html output whitepsace removal/tidy-up, and, picking a non-default number of css aggregates. So far those had been more convenience than performance enhancements.

mikeytown2’s picture

Status: Active » Closed (works as designed)

Sorry to hear that AdvAgg with Varnish in your case didn't work for you. Going to close this issue.