Commit f8ec0d1a authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2851214 by amateescu: ViewsEntitySchemaSubscriber does a lot of...

Issue #2851214 by amateescu: ViewsEntitySchemaSubscriber does a lot of unnecessary work every time an entity type definition is updated
parent 7f37114a
Loading
Loading
Loading
Loading
+5 −0
Changes for core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -144,6 +144,11 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
      $changes[] = static::REVISION_DATA_TABLE_REMOVAL;
    }

    // Stop here if no changes are needed.
    if (empty($changes)) {
      return;
    }

    /** @var \Drupal\views\Entity\View[] $all_views */
    $all_views = $this->entityManager->getStorage('view')->loadMultiple(NULL);