First of all, thanks for this module, it saved our ass :-)

We are using this on a site with 15M pageviews/mo that uses Domain Access with multiple domains. All sorts of things happen with static caching and multiple domains, one of the things is problems with CSS - that's what you know and why created the module :-)

Due to the vast number of pageviews, our advagg_css folder in sites/default/files is kind of growing:

[xxx@web1 files]$ du -hs advagg_css/
11G	advagg_css/
[xxx@web1 files]$ du -hs advagg_js
129M	advagg_js
[xxx@web1 advagg_css]$ ls | wc -l # number of files
110376

That surprised me a bit but there might be a reason for it. Is there anything we can do to debug why is there so many files (we don't clear theme registry cache that often) and is there a way to determine which files can be safely deleted? I am thinking everything older than 12 hours maybe?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Are you constantly changing a css file? What does admin/settings/advagg/info say about css files? I noticed your css_e9edc3560ebd39fdd86e126a55ce5ac8_372.css file.... that means something in this bundle has changed 372 times which means that file that is constantly changing should be pulled out of the main aggregate and placed into it's own... which can be done; haven't coded that submodule, yet. Also your print css file is still throwing a 404.

I use D7 cores timeline for clearing aggregates, which is 30 days.

mikeytown2’s picture

FileSize
2.09 KB

committed this patch; should help with the 404 css issue thats been chasing you

meba’s picture

Hmm, we have pretty standard CSS and JS, if any file is changing, that would mean it is autogenerated and we don't do that. How does Advagg figure out a file changed?

mikeytown2’s picture

file m time or md5; its an option.

admin/settings/advagg/info say about css files? what ones change the most?

mikeytown2’s picture

Title: 11GB and counting » Create Bundle sub module
Category: support » feature

Going to turn this into a feature request as this new module (it is part of the plan) should take care of your issue.

http://drupal.org/project/bundlecache is what I'm looking to copy. Will need a database table to hold the bundle mapping information; I see 3 columns: parent md5, child md5, files (serialized array). Analysis/mapping-creation happens once a day via cron (or button). Module will wait 48 hours after install before it starts to split the aggregate into various bundles.

Split logic will be based off of what files are used in what bundles and how often a file changes. For any page I could see up to 4 bundles being used; one for each category:
- Core and rarely changes.
- Core and occasionally changes.
- Not core and rarely changes.
- Not core and occasionally changes.
Core means files that are used in almost every bundle; can be from a theme or module. What is considered Core will vary by theme; most sites use at least 2 themes; thus there are at least 2 different "core" bundles.

mikeytown2’s picture

need to record the theme being used in the data column. Will let me know if a certain file only is used on a theme or all themes.

global $custom_theme, $theme;
variable_get('theme_default');
mikeytown2’s picture

Status: Active » Fixed
FileSize
13.54 KB

Bundler module has been added!

patch below has been committed. This should help with a gazillion bundles getting re-created all the time; will also help with page load times.

Status: Fixed » Closed (fixed)

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