Problem/Motivation
Using drupal 10.1.5, each back-office page takes up to 10 seconds to load.
After a few research, I found that the problem comes from the on-the-fly minification implemented in #3302755: On-the-fly JavaScript minification.
You may think that this occurs only once and then the javascript is loaded from the disk.
But in reality, as each back-office page uses differents library, the loading time occurs again and again when you go through the back-office.
Consequently, at the moment the back-office is mostly unusable until the core javascript aggregation is disabled.
I attached a screenshot taken from xhprof so you can see how many time takes the on-the-fly minification for 75 javascripts files (from core and contrib only, no custom modules).
Steps to reproduce
- Install Drupal 10.1.5
- Ensure the core javascript aggregation is enabled
- Display a back-office page
- See that the loading time is really slow (might be slower on a project with multiple modules enabled)
Proposed resolution
I looked at the issue #3308122: Pre-minify core JavaScript which should solve the problem in the end, but I'm not sure this can wait until then.
You may want to rollback #3302755: On-the-fly JavaScript minification and deliver the whole feature #3302755: On-the-fly JavaScript minification + #3308122: Pre-minify core JavaScript at once.