This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php | |
index 8d6e28c..db55db8 100644 | |
--- a/core/lib/Drupal/Core/DrupalKernel.php | |
+++ b/core/lib/Drupal/Core/DrupalKernel.php | |
@@ -7,9 +7,9 @@ | |
namespace Drupal\Core; | |
+use Drupal\Component\Utility\Settings; | |
use Drupal\Component\PhpStorage\PhpStorageFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\views\ViewResult. | |
*/ | |
namespace Drupal\views; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\Entity\EntityIterator. | |
*/ | |
namespace Drupal\Core\Entity; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns the plugin category that this display requires. | |
* | |
* This can be used for filtering views plugins. E.g. If a plugin category of | |
* 'foo' is specified, only plugins with no 'types' declared or 'types' | |
* containing 'foo'. If you have a type of bar, this plugin will not be used. | |
* This is applicable for style, row, access, cache, and exposed_form plugins. | |
* | |
* @return string | |
* The required category type. Defaults to 'normal'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$times = array(); | |
for ($i = 0; $i <= 10; $i++) { | |
$view = views_get_view('frontpage'); | |
timer_start('damian'); | |
for ($i = 0; $i <= 100; $i++) { | |
$view->setDisplay('page_1'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/views/lib/Drupal/views/ViewsDataCache.php b/core/modules/views/lib/Drupal/views/ViewsDataCache.php | |
index bc5bd02..611e117 100644 | |
--- a/core/modules/views/lib/Drupal/views/ViewsDataCache.php | |
+++ b/core/modules/views/lib/Drupal/views/ViewsDataCache.php | |
@@ -128,10 +128,10 @@ public function get($key = NULL) { | |
} | |
if (isset($this->storage[$key])) { | |
- if (!$from_cache) { | |
+ if (!$from_cache && !isset($this->requestedTables[$key])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retrieves a list of fields for the current display. | |
* | |
* This also takes into account any associated relationships, if they exist. | |
* | |
* @param bool $groupable_only | |
* (optional) TRUE to only return an array of field labels from handlers | |
* that support the use_string_group_by method, defaults to FALSE. | |
* | |
* @return array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Drupal/views_field_view/Plugin/views/field/View.php b/lib/Drupal/views_field_view/Plugin/views/field/View.php | |
index 567667d..e3b0833 100644 | |
--- a/lib/Drupal/views_field_view/Plugin/views/field/View.php | |
+++ b/lib/Drupal/views_field_view/Plugin/views/field/View.php | |
@@ -23,6 +23,34 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; | |
class View extends FieldPluginBase { | |
/** | |
+ * Keeps track of which views are currently being run. | |
+ * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return is_object($data) && array_filter($this->supportedInterfaceOrClass, function($name) use ($data) { | |
return $data instanceof $name; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function supportedInterfaceOrClass($data, $format = NULL) { | |
// If there is a format passed in and specified on the class, check if it is | |
// correct. | |
if (isset($format) && isset($this->format) && !in_array($format, $this->format)) { | |
return FALSE; | |
} | |
if (is_object($data)) { |