summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2010-03-10 20:10:07 (GMT)
committer Earl Miles2010-03-10 20:10:07 (GMT)
commitc3263fd8b466724d2c1b337490252fa0f48936cf (patch)
tree10fa2f48c1b9d7da69e887f05c031facec002065
parent9b9b27a7152e968a7e46615e9c7434f7b3f1dceb (diff)
#684656 by yhahn: Prevent Views from performing an unneeded variable_set() during block list.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--views.module6
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index bf9a6f8..58ff405 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -28,6 +28,7 @@ Views 2.x-dev
o #674772 by joachim: Unable to distinguish profile.module fields with same name in different profile categories.
o #727798 by SteveReher: Fix typo in overrides.html documentation.
o #621980 by yhahn: Namespace tabs.js to guarantee no conflicts with jQuery UI.
+ o #684656 by yhahn: Prevent Views from performing an unneeded variable_set() during block list.
Other changes:
o #570558 by yhahn: Segment default views caching to conserve memory used by Views during normal operation.
diff --git a/views.module b/views.module
index ee5e22d..002becf 100644
--- a/views.module
+++ b/views.module
@@ -349,7 +349,11 @@ function views_block($op = 'list', $delta = 0, $edit = array()) {
}
}
- variable_set('views_block_hashes', $hashes);
+ // Only save hashes if they have changed.
+ $old_hashes = variable_get('views_block_hashes', array());
+ if ($hashes != $old_hashes) {
+ variable_set('views_block_hashes', $hashes);
+ }
// Save memory: Destroy those views.
foreach ($views as $view) {
$view->destroy();