Problem/Motivation

main.min.css is 48kb and pre-minified.

When visiting multiple different pages in Drupal CMS, CSS from components and similar gets conditionally added to CSS aggregates. This means that main.min.css can end up being included in multiple different aggregates.

You can see this in #3554115: Add performance tests where over 2mb of CSS is downloaded via visiting each of the pages in Byte's main menu.

See #734080: Set preprocess: false for jquery.min.js to reduce duplication between asset aggregates for a similar (js) example.

Steps to reproduce

Proposed resolution

The easiest way to prevent this is to exclude the biggest files from aggregation, this way they're only downloaded once (per browser) regardless of how many library combinations exist on a site.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork mercury-3554413

Command icon 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

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

catch’s picture

phenaproxima’s picture

Status: Needs review » Needs work

One small request, otherwise good to go.

catch’s picture

Status: Needs work » Needs review

Added a comment.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

🚢

phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

The CI failure is unrelated and due to recent change in core. We can fix that in a separate issue. Merged into 1.x, thanks @catch!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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