Several improvements for performance measuring

This commit is contained in:
Michael Vogel 2013-01-26 18:35:39 +01:00
parent 2c93067682
commit fdee002f73
9 changed files with 87 additions and 36 deletions

View file

@ -201,12 +201,15 @@ function get_plugin_info($plugin){
'author' => array(),
'version' => ""
);
if (!is_file("addon/$plugin/$plugin.php")) return $info;
$stamp1 = microtime(true);
$f = file_get_contents("addon/$plugin/$plugin.php");
$a->save_timestamp($stamp1, "file");
$r = preg_match("|/\*.*\*/|msU", $f, $m);
if ($r){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {
@ -266,11 +269,13 @@ function get_theme_info($theme){
$info['unsupported'] = true;
if (!is_file("view/theme/$theme/theme.php")) return $info;
$stamp1 = microtime(true);
$f = file_get_contents("view/theme/$theme/theme.php");
$a->save_timestamp($stamp1, "file");
$r = preg_match("|/\*.*\*/|msU", $f, $m);
if ($r){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {