This project enhances the back end performance of core's CSS and JavaScript aggregation features.

A much improved version of this logic will be included in Drupal 10.1.0.

- CSS and JavaScript aggregates are generated using the same lazy creation pattern as image derivative presets.

- This allows css and javascript aggregates to be built by multiple, parallel threads during cold starts. Core currently builds them inline during the page rendering process can add around 900ms to serving pages that do this.

- Removes runtime file_exists() checks for css and js aggregates. These can be very expensive on systems running with NFS file storage or similar and occur on every page request in core.

Instructions for use

No configuration should be necessary, however you need clean URLs and CSS/JavaScript aggregation to be enabled on your site. Otherwise just enable the module. You may need to clear page cache (or varnish if using that) after doing this since aggregate file names will change.

Fast 404s

If using fast 404s, you may need to set the following variable in settings.php:

$conf['404_fast_paths_exclude'] = '/\/(?:(styles|css|js))\//';
Supporting organizations: 

Project information

Releases