Drupal 7 and earlier versions of Drupal 8, route rebuilding was
triggered by a global flag (shared between requests),
so the next time some process required routing information, the
rebuild was triggered, and a lock is set, which other processes run
into as well.
This lead to various problems:
* Bad performance during the rebuilding for multiple processes
* Race conditions caused by the lock
We tackled the problem by splitting up the work into two pieces:
* Rebuild the router on the request, which is asking for it.
This lead to a desired slowdown of the installer:
https://www.drupal.org/node/356399
* Speed up the installer again: https://www.drupal.org/node/2451665
----
Best greetings
Daniel