Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
think the $start = views_microtime();
should start only after the check if the fields are rendered. Minor think but dowsn't make sense to me why the timer could start again because than the render time could get nearly to zero. But maybe I miss something.
Index: views/plugins/views_plugin_style.inc
--- views/plugins/views_plugin_style.inc Base (1.8.2.8)
+++ views/plugins/views_plugin_style.inc Locally Modified (Based On 1.8.2.8)
@@ -210,11 +210,12 @@
return;
}
- $start = views_microtime();
if (isset($this->rendered_fields)) {
return $this->rendered_fields;
}
+ $start = views_microtime();
+
$this->view->row_index = 0;
$keys = array_keys($this->view->field);
foreach ($result as $count => $row) {
Comment | File | Size | Author |
---|---|---|---|
#1 | 943984-not_used_variable.patch | 385 bytes | dawehner |
Comments
Comment #1
dawehnerMake a patch file. This saves kittens! I can't find the code here
$start is not used anywhere
So remove it here. The code lives in view::render
Comment #2
Kars-T CreditAttribution: Kars-T commentedMea culpa. I just forgot to upload my patch. But as you say the line is of none use I now set yours to RTBC. And I always think of the kittens ;)
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedNot sure if this is valid for 7.x; didn't apply, didn't check why. Applied to 2.x and 3.x in D6 though.
Comment #4
bojanz CreditAttribution: bojanz commentedIn D7 it's just "microtime", "views_microtime" doesn't even exist.
Comment #5
dawehnerThat's suprising. In d7 the style plugin has neither get_field nor render_fields function.
Comment #6
dawehnerPorted #502348: How group display by mutliple fields? and this patch to d7.