Problem/Motivation
With modules that add many small js files (such as the upcomming ckeditor5) we need to make sure groups are relatively stable to make use of the aggregate generation.
Steps to reproduce
Install the ckeditor 5 module, add a few different toolbar configuration and see what it does to the aggregates.
Proposed resolution
Find an algorithm that makes groups stable enough, taking into account number of groups and size of group.
Describe a few use-cases we want to optimize for, each use-case should define:
- Modules installed
- Types of users involved
- List of pages to visit
Then for each scenario we look at the following measurements before/after:
- Number of generated JS files
- Total size of the generated JS files
- For each page/user role: the number of js files and their sizes
- Number of time a group is used (the higher the better)
What we optimize for should be (in order):
- Maximum Group reuse (prevent expensive aggregate generation in Drupal)
- Minimum number of groups per page (optimize end-user performance by limiting http requests)
- Size of the groups (optimize end-user performance by limiting amount of JS sent)
Remaining tasks
Do the thing.
Release notes snippet
Issue fork drupal-3227837
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nod_Comment #4
wim leersI sense an interesting asset library dependency graph-powered algorithm 🤓