Make WordPress Core

Opened 2 years ago

Last modified 11 months ago

#57548 new enhancement

Stop concatenating scripts and stylesheets in wp-admin and retire load-scripts.php and load-styles.php

Reported by: azaozz's profile azaozz Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Script Loader Keywords:
Focuses: Cc:

Description

This functionality was added 14 years ago, #8628. At the time it made the loading of wp-admin quite faster by reducing the number of HTTP requests by more than 50%. The downside is that each wp-admin page has it's own set of concatenated scripts and stylesheets making them harder for caching in browser/network caches. Nevertheless the benefits of the reduced number of requests was greater than the insufficient caching.

This changed when HTTP/2 became more popular. Scripts and stylesheets are loaded much more efficiently there and concatenation is generally not needed. This allows for better browser/network caching and for eventual prioritization. In that terms disabling concatenation of scripts and stylesheets in wp-admin would reduce complexity and improve performance in many cases.

Change History (6)

#1 @momo360modena
2 years ago

And I will add that this proposal will reduce the attack perimeter in terms of WordPress security.

Many security plugins propose to reinforce the parameters of calls to these 2 URLs, because possible source of DDOS attack.

#2 @desrosj
2 years ago

I think this is worth pursuing. Once we have a working solution, we should gather some performance comparisons to make a comparison between the two approaches.

This ticket was mentioned in Slack in #core-editor by mamaduka. View the logs.


18 months ago

#4 @markhowellsmead
18 months ago

The current implementation (in WordPress 6.3) is currently causing the asset generation and concatenation to fail with an HTTP 503 error if less than 1.5 Gb RAM is assigned to the site. See https://github.com/WordPress/gutenberg/issues/54294 for fuller details.

#5 @markhowellsmead
18 months ago

Update from the hosting company: the peak RAM required for this process is 1.9 Gb.

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


11 months ago

Note: See TracTickets for help on using tickets.