Problem/Motivation
In install_finished() we say:
// Build the router once after installing all modules.
// This would normally happen upon KernelEvents::TERMINATE, but since the
// installer does not use an HttpKernel, that event is never triggered.
\Drupal::service('router.builder')->rebuild();
But since #2589967: Rebuild routes immediately when modules are installed we rebuild the router during module install so this is no longer necessary.
Proposed resolution
Remove it and do less work.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3157866-6.patch | 1.44 KB | alexpott |
| #6 | 3-6-interdiff.txt | 644 bytes | alexpott |
| #3 | 3157866-2.patch | 830 bytes | alexpott |
Comments
Comment #2
alexpottI think this might be tangentially related to #2350711: Update module fails on installation
Comment #3
alexpottComment #4
alexpottIt's not at all related to #2350711: Update module fails on installation - well it is only in the way that I noticed this whilst trying to work what was causing that bug.
Comment #5
alexpottComment #6
alexpottSpotted another one!
Comment #7
johnwebdev commentedLess work 🎉
#3086307: Improve installer performance by ~20% by rebuilding the router after the entire installation is complete rather than after each module is related, as it tries to do the opposite, to keep these rebuilds, and remove the behaviour defined in #2589967: Rebuild routes immediately when modules are installed.
Comment #8
catchNot a perfect measure, but the last core test run was 59 minutes: https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/23471/
The test run for #4 was 56 minutes:
https://dispatcher.drupalci.org/job/drupal_patches/52633/
So potentially ~3 minutes knocked off total test run times. We should compare #6 to the above when it comes back.
I think it is fine to do the issue here, then #3086307: Improve installer performance by ~20% by rebuilding the router after the entire installation is complete rather than after each module can continue with a more realistic baseline to work against.
Comment #9
johnwebdev commentedLook like #6 had 57 min build duration, and I agree with you catch :) It's still an improvement, and it doesn't necessarily make the other issue any harder.
Comment #10
johnwebdev commented2 minutes faster :)
Comment #11
alexpottGiven the work on #3086307: Improve installer performance by ~20% by rebuilding the router after the entire installation is complete rather than after each module it'd be great to see that one land and this one be forgotten about.
Comment #12
catchShould we mark this as duplicate?
Comment #13
alexpottYeah @catch - that's a good call.