Created
September 29, 2017 15:07
-
-
Save nidble/c468a0e5972c80f89b4caab20b9b82ba to your computer and use it in GitHub Desktop.
block.module profiling
This file contains 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 | |
// _block_render_blocks: | |
$startTime = microtime(true); | |
// original code: | |
$array = module_invoke($block->module, 'block_view', $block->delta); | |
$endTime = microtime(true); | |
$elapsed = $endTime - $startTime; | |
var_dump([$block->module, $block->delta, $elapsed]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment