Problem/Motivation

Following #1014086: Stampedes and cold cache performance issues with css/js aggregation asset aggregation no-longer blocks HTML page requests, this means we can start to look at more robust minification methods.

This has come up lots of times before, but starting a new issue since most of the existing ones are very outdated at this point.

Last time we looked at this, the front-runner was Assetic. This is no longer developed by the original maintainer, but there's a maintained fork at https://github.com/assetic-php/assetic

Also found: https://github.com/matthiasmullie/minify

And: https://doc.wikimedia.org/mediawiki-libs-Minify/master/, which the new Assetic has as a dependency.

JavaScript has its own set of challenges and therefore its own issue #3302755: On-the-fly JavaScript minification.

Steps to reproduce

Proposed resolution

Remaining tasks

This is only worth doing if it ends up with a better result than what we currently have - both in terms of maintenance burden and output.

  • Collect existing bug reports with CSS aggregation (there are a handful), and ideally come up with a CSS file that includes test-cases.
  • Check the test case against the above libraries
  • Dependency evaluation of the libraries
  • Integration patch to include the library in core
  • Potentially profiling against the existing implementation

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

catch’s picture

catch’s picture

nod_’s picture

That would help remove complex regex too

nod_’s picture

We'll likely need our own layer on top to do some resolving i guess

catch’s picture

Issue summary: View changes

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

catch’s picture

Adding some related issues about bugs in the regular expressions.

catch’s picture

catch’s picture

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.