diff --git a/core/core.services.yml b/core/core.services.yml
index 1d9b2d2..4c81a7a 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -530,6 +530,11 @@ services:
     tags:
       - { name: backend_overridable }
   router.builder:
+    class: Drupal\Core\Routing\RouteBuilderProxy
+    arguments: ['@state']
+    calls:
+      - [setContainer, ['@service_container']]
+  router.builder.real:
     class: Drupal\Core\Routing\RouteBuilder
     arguments: ['@router.dumper', '@lock', '@event_dispatcher', '@module_handler', '@controller_resolver', '@state']
   router.rebuild_subscriber:
diff --git a/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php b/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php
index 6e93561..f2ca2fc 100644
--- a/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php
+++ b/core/lib/Drupal/Core/Installer/InstallerServiceProvider.php
@@ -51,7 +51,7 @@ public function register(ContainerBuilder $container) {
 
     // Replace the route builder with an empty implementation.
     // @todo Convert installer steps into routes; add an installer.routing.yml.
-    $definition = $container->getDefinition('router.builder');
+    $definition = $container->getDefinition('router.builder.real');
     $definition->setClass('Drupal\Core\Installer\InstallerRouteBuilder');
 
     // Remove dependencies on Drupal's default session handling.
diff --git a/core/lib/Drupal/Core/Routing/RouteBuilderProxy.php b/core/lib/Drupal/Core/Routing/RouteBuilderProxy.php
new file mode 100644
index 0000000..873bf9c
--- /dev/null
+++ b/core/lib/Drupal/Core/Routing/RouteBuilderProxy.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Routing\RouteBuilderProxy.
+ */
+
+namespace Drupal\Core\Routing;
+
+use Drupal\Core\State\StateInterface;
+use Symfony\Component\DependencyInjection\ContainerAware;
+
+/**
+ * A simple service to be used instead of the route builder.
+ *
+ * The route builder service is required by quite a few other services,
+ * however it has a lot of dependencies and it is faster/simpler to only
+ * instantiate it when actually needed
+ */
+class RouteBuilderProxy extends ContainerAware implements RouteBuilderInterface {
+
+  /**
+   * @var \Drupal\Core\State\StateInterface
+   */
+  protected $state;
+
+  /**
+   * @param \Drupal\Core\State\StateInterface $state
+   */
+  public function __construct(StateInterface $state) {
+    $this->state = $state;
+  }
+
+  /**
+   * Rebuilds the route info and dumps to dumper.
+   *
+   * @return bool
+   *   Returns TRUE if the rebuild succeeds, FALSE otherwise.
+   */
+  public function rebuild() {
+    $this->routeBuilder()->rebuild();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCollectionDuringRebuild() {
+    $this->routeBuilder()->getCollectionDuringRebuild();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function rebuildIfNeeded() {
+    if ($this->state->get(static::REBUILD_NEEDED, FALSE)) {
+      return $this->rebuild();
+    }
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setRebuildNeeded() {
+    $this->state->set(static::REBUILD_NEEDED, TRUE);
+  }
+
+  /**
+   * @return \Drupal\Core\Routing\RouteBuilder
+   */
+  protected function routeBuilder() {
+    return $this->container->get('router.builder.real');
+  }
+
+}
