The project page should explain more clearly what this module (and its submodules) does exactly. Right now, this is not very clear.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Going to use this issue to work out a better description. It's kinda hard to describe what this does at a high level without getting into the details of how it works.

High Level:
Fixes css/js aggregation from my point of view. Takes care of every issue we've encountered and does things that I wish would happen (cdn/compression).

Low level description:
This module is a replacement for cores css/js aggregation. When an aggregate is created it records what files go into the aggregate and in what order they belong. What this allows for is the ability to re-create the aggregate via filename. Example filename:
css_3d065e72e1bde98881aa8ff07154e7da_0.css
css_[MD5]_[Counter].css
The MD5 hash is used to lookup the bundle and what files are in it and in what order the bundle needs to be re-created. The counter is a way to handle changes that happen within the aggregate. When hook_flush_caches is ran, this will scan all files that have been used in an aggregate and if one of them has changed then it it will increment the counter for that individual file and it will increment the counter for all bundles that contain that file. It will then generate new aggregates for the bundles that need to be updated. So in the example above if a file is changed then the new filename is now
css_3d065e72e1bde98881aa8ff07154e7da_1.css
If we add/subtract a file from the bundle then it gets a new name
css_329b40f01efc15a5d83dde5117251842_0.css
What this means is the aggregate only changes it's name when the contents of it changes; it increments the counter by one if the change is because of an updated file within, or a new name if a file was added/removed as this will generate a new MD5 hash.

Doing this query one can see where everything is used and what files change the most often

SELECT * 
FROM advagg_bundles
INNER JOIN advagg_files USING ( filename_md5 )

With this logic one can automatically make smarter bundles in the future. Put files that don't change very often in one bundle; put frequently changing files in another. Create a most commonly used bundle. This is one of the next steps to take & I plan on making the sub module in the future after I'm able to analyze the data.

mikeytown2’s picture

Title: Document what this module does exactly » Document what this module does exactly. Needs a readme file.
mikeytown2’s picture

Status: Active » Fixed
FileSize
7.25 KB

committed this patch

mikeytown2’s picture

FileSize
12.32 KB

committed this patch

Status: Fixed » Closed (fixed)

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