diff options
author | friendica <info@friendica.com> | 2012-07-25 22:55:43 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-25 22:55:43 -0700 |
commit | 7bdbb8331c8341e6c3ea0b463f0a742d06972245 (patch) | |
tree | aefe7364c818bd29d24800b2ce28d894f946f85d /include/conversation.php | |
parent | 21b3dc9c27be50e73944eaec97001ad1279400f1 (diff) | |
download | volse-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/conversation.php')
-rw-r--r-- | include/conversation.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php index c7406b1dc..f0d453cf5 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -311,6 +311,7 @@ function localize_item(&$item){ if(!function_exists('conversation')) { function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { + $tstart = dba_timer(); require_once('bbcode.php'); @@ -522,6 +523,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $comments = array(); foreach($items as $item) { + + if((intval($item['gravity']) == 6) && ($item['id'] != $item['parent'])) { if(! x($comments,$item['parent'])) $comments[$item['parent']] = 1; @@ -549,6 +552,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { foreach($items as $item) { + $tfirst = dba_timer(); + $comment = ''; $template = $tpl; $commentww = ''; @@ -872,8 +877,21 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { call_hooks('display_item', $arr); $threads[$threadsid]['items'][] = $arr['output']; + + $tlast = dba_timer(); + +// logger('render dba_timer: item# ' . $item['id'] . ' ' . sprintf('%01.4f',$tlast - $tfirst)); + + + + } } + +// logger('render total dba_timer: ' . sprintf('%01.4f',$tlast - $tstart)); + + + } // logger('threads: ' . count($threads) . ' update: ' . $update); @@ -907,6 +925,10 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { )); } + $tfinal = dba_timer(); +// logger('render template dba_timer: ' . sprintf('%01.4f',$tfinal - $tlast)); + + return $o; }} |