Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Been thinking about this quite a bit and it seems like it would be beneficial.
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedGood example of this in found here: #1192422-14: Bundler logics documentation
AdvAgg says this is a good group of files based off the sites usage pattern
In reality this is what gets outputted by the bunder since it will not change the order
Looking at this the optimal thing to do is make sure states.js and form.js load after devel.js. I should be able to generate advice like this already from the data stored in the DB, just need to query it and then create a report.
The result would look like this
Report query was sorta worked on in this issue #2426285: Better bundling algorithm; change file order if possible.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedGood idea was brought up here #1192422-19: Bundler logics documentation. Just work on auto optimizing core css/js ordering. Use a form of the dependencies array found in hook_library so someone using drupal_add_js or hook_js_alter can add the dependencies in and let advagg do the rest.
The reorder algorithm would run after the analysis query but before the merging function of the bundler. This would be a checkbox setting. If a file lists no dependencies then nothing above it can move below that file.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedComment #4
mikeytown2 CreditAttribution: mikeytown2 commentedAnswer might be in here
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedToo hard to pull off currently.