Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.299.2.3
diff -u -F^f -r1.299.2.3 block.module
--- modules/block/block.module	24 Jun 2008 14:40:08 -0000	1.299.2.3
+++ modules/block/block.module	10 Jun 2009 21:22:14 -0000
@@ -470,7 +470,22 @@ function block_list($region) {
             $array = $cache->data;
           }
           else {
+            // Performance measurement patch -- by 2bits.com
+            // Part 1
+            $id = "$block->module-$block->delta";
+            timer_start($id);
+            // End of part 1
+
             $array = module_invoke($block->module, 'block', 'view', $block->delta);
+
+            // Part 2
+            $time = timer_read($id);
+            if (variable_get('block_timing', 0)) {
+              drupal_set_message("$time - $region/$block->module:$block->delta");
+            }
+            // End of part 2
+            // End patch -- 2bits.com
+
             if (isset($cid)) {
               cache_set($cid, $array, 'cache_block', CACHE_TEMPORARY);
             }

