aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-09 02:46:50 -0800
committerfriendica <info@friendica.com>2013-02-09 02:46:50 -0800
commit55df911403e64ce02fa910fa59bfe8ec7d907608 (patch)
treeebe0cc9df1e0cec355737f6b7147ad446bd47f66 /include
parent28b11f3567deff72dff943af67ab963b98262eda (diff)
downloadvolse-hubzilla-55df911403e64ce02fa910fa59bfe8ec7d907608.tar.gz
volse-hubzilla-55df911403e64ce02fa910fa59bfe8ec7d907608.tar.bz2
volse-hubzilla-55df911403e64ce02fa910fa59bfe8ec7d907608.zip
performance profiling - 95% of the time is spent in "conversation()" e.g. rendering and templates, even with the new theme engine. The time spent in the DB is miniscule. Will have to profile the bbcode processing and template engines individually to drill down further.
Diffstat (limited to 'include')
-rw-r--r--include/text.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 8cb3a930a..d0b2733c0 100644
--- a/include/text.php
+++ b/include/text.php
@@ -489,6 +489,10 @@ function dlogger($msg,$level = 0) {
}}
+function profiler($t1,$t2,$label) {
+ if(file_exists('profiler.out') && $t1 && t2)
+ @file_put_contents('profiler.out', sprintf('%01.4f %s',$t2 - $t1,$label) . "\n", FILE_APPEND);
+}
if(! function_exists('activity_match')) {