Score:-3

Advagg Bundler would NOT spit out same size CSS bundles

mz flag

Trying to make sure Advagg bundler spits out two equal size CSS bundles as it makes a massive difference in initial server response time.

For some reason, Advagg will split files into 2 bundles (first one 4kb and second one 36kb).

On Dev server, it works perfectly with same settings. Both identical systems.

I have tried uninstalling/re-installing a few times with no luck.

On production site, it shows 88 groupings. On dev server (where everything works fine), it is showing 150 groupings.

I have spent hours and hours with no luck.

Update:

It appears that on production site, Advagg is trying to put all the system files or those added by modules in one file and theme CSS files in the second aggregate file. It then loads system CSS files aggregate first which becomes render blocking for the theme CSS files hence 4kb first file blocking 36kb second file.

This is not the intended functionality. Bundler logic allows for aggregation based on size or number of files.

How can I debug/fix this?

id flag
What is the question? Only you can tell us the differences between your dev platform—where I think you are saying this works as expected—and your production platform.
id flag
This is not a forum. It is a question-and-answer site: https://drupal.stackexchange.com/tour What I meant was “you haven’t asked a question”.
Kevin avatar
in flag
The only question is "How can I debug/fix this?" for something that is rather vague without much of a clear answer. It sounds like a module bug or question that should be posted in that module queue for better direction.
Kevin avatar
in flag
It's a Q&A site, it's really hard to provide a direct answer "how do I debug this?". Generally these things are better spotted or known by contrib module maintainers.
Score:0
mz flag

It appears that the only option is to add template CSS via drupal_add_js and give it a higher priority so that aggregates have similar sizes.

This is the code I added to template.php to get some files included in the aggregate.

  // loading font awesome separately to get it into aggregates

drupal_add_css(drupal_get_path('theme', 'mytheme') . '/font-awesome/css/font-awesome.min.css');

This is obviously not a solution but just a workaround the issue.

Update:

Disabling and enabling the base theme fixed the issue in entirety. Apparently just clearing the theme registry wasn't enough.

Hope this helps someone else with same issue.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.