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) {

CommentFileSizeAuthor
#1 943984-not_used_variable.patch385 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

FileSize
385 bytes

Make 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

Kars-T’s picture

Status: Needs review » Reviewed & tested by the community

Mea 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 ;)

merlinofchaos’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Not 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.

bojanz’s picture

In D7 it's just "microtime", "views_microtime" doesn't even exist.

dawehner’s picture

That's suprising. In d7 the style plugin has neither get_field nor render_fields function.

dawehner’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.