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

CommentFileSizeAuthor
#6 3157866-6.patch1.44 KBalexpott
#6 3-6-interdiff.txt644 bytesalexpott
#3 3157866-2.patch830 bytesalexpott

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
Related issues: +#2350711: Update module fails on installation

I think this might be tangentially related to #2350711: Update module fails on installation

alexpott’s picture

StatusFileSize
new830 bytes
alexpott’s picture

It'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.

alexpott’s picture

alexpott’s picture

StatusFileSize
new644 bytes
new1.44 KB

Spotted another one!

johnwebdev’s picture

catch’s picture

Not 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.

johnwebdev’s picture

Look 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.

johnwebdev’s picture

Status: Needs review » Reviewed & tested by the community

2 minutes faster :)

catch’s picture

Should we mark this as duplicate?

alexpott’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Yeah @catch - that's a good call.