aboutsummaryrefslogtreecommitdiffstats
path: root/include/template_processor.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-25 22:55:43 -0700
committerfriendica <info@friendica.com>2012-07-25 22:55:43 -0700
commit7bdbb8331c8341e6c3ea0b463f0a742d06972245 (patch)
treeaefe7364c818bd29d24800b2ce28d894f946f85d /include/template_processor.php
parent21b3dc9c27be50e73944eaec97001ad1279400f1 (diff)
downloadvolse-hubzilla-7bdbb8331c8341e6c3ea0b463f0a742d06972245.tar.gz
volse-hubzilla-7bdbb8331c8341e6c3ea0b463f0a742d06972245.tar.bz2
volse-hubzilla-7bdbb8331c8341e6c3ea0b463f0a742d06972245.zip
picking up the page load times a bit
Diffstat (limited to 'include/template_processor.php')
-rw-r--r--include/template_processor.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/template_processor.php b/include/template_processor.php
index 46252c355..e891b8bf2 100644
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -189,6 +189,7 @@
}
public function replace($s, $r) {
+// $t1 = dba_timer();
$this->r = $r;
$s = $this->_build_nodes($s);
@@ -199,12 +200,17 @@
// remove comments block
$s = preg_replace('/{#[^#]*#}/', "" , $s);
+// $t2 = dba_timer();
+
// replace strings recursively (limit to 10 loops)
$os = ""; $count=0;
while($os!=$s && $count<10){
$os=$s; $count++;
$s = $this->var_replace($s);
}
+// $t3 = dba_timer();
+// logger('macro timer: ' . sprintf('%01.4f %01.4f',$t3 - $t2, $t2 - $t1));
+
return $s;
}
}