diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 9de0ff2..a414009 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -322,7 +322,11 @@ function views_menu() {
  */
 function views_menu_alter(&$callbacks) {
   $our_paths = array();
-  $views = views_get_applicable_views('uses_hook_menu');
+  $query = drupal_container()->get('entity.query')->get('view')
+    ->condition('disabled', '0')
+    ->condition('display.*.display_options.path', NULL, 'IS NOT NULL')
+    ->execute();
+  $views = views_get_applicable_views('uses_hook_menu', $query);
   foreach ($views as $data) {
     list($view, $display_id) = $data;
     $result = $view->executeHookMenu($display_id, $callbacks);
@@ -1098,6 +1102,9 @@ function views_get_enabled_display_extenders() {
  * Return a list of all views and display IDs that have a particular
  * setting in their display's plugin settings.
  *
+ * @param string $type
+ *   A flag from display plugin definitions, e.g., 'uses_hook_menu'.
+ *
  * @return
  * @code
  * array(
@@ -1107,32 +1114,34 @@ function views_get_enabled_display_extenders() {
  * @endcode
  */
 function views_get_applicable_views($type) {
-  // @todo: Use a smarter flagging system so that we don't have to
-  // load every view for this.
-  $result = array();
-  $views = views_get_all_views();
+  $container = drupal_container();
 
-  foreach ($views as $view) {
-    // Skip disabled views.
-    if (!$view->isEnabled()) {
-      continue;
+  // Get all display plugins which provides the type.
+  $display_plugins = $container->get('plugin.manager.views.display')->getDefinitions();
+  $ids = array();
+  foreach ($display_plugins as $id => $definition) {
+    if (!empty($definition[$type])) {
+      $ids[$id] = $id;
     }
+  }
 
-    $display = $view->get('display');
-    if (empty($display)) {
-      // Skip this view as it is broken.
-      continue;
-    }
+  $entity_ids = $container->get('entity.query')->get('view')
+    ->condition('disabled', '0')
+    ->condition("display.*.id", $ids, 'IN')
+    ->execute();
 
+  $result = array();
+  foreach ($container->get('plugin.manager.entity')->getStorageController('view')->load($entity_ids) as $view) {
     // Check each display to see if it meets the criteria and is enabled.
     $executable = $view->get('executable');
-    $executable->setDisplay();
+    $executable->initDisplay();
     foreach ($executable->displayHandlers as $id => $handler) {
       if (!empty($handler->definition[$type]) && $handler->isEnabled()) {
         $result[] = array($executable, $id);
       }
     }
   }
+
   return $result;
 }
 
