time also loading of a mail body

This commit is contained in:
Ralf Becker 2014-09-25 12:50:45 +00:00
parent 007b632017
commit 5b2c568eb5

View File

@ -156,11 +156,24 @@ function mail_times($acc_id, array &$times, $prefix='mail_')
$mail_ui->get_rows($query, $rows, $readonlys);
$fetchtime = microtime(true);
if (isset($_GET['uid']) && (int)$_GET['uid'] > 0)
{
$uid = (int)$_GET['uid'];
}
else // use uid of first returned row
{
$row = array_shift($rows);
$uid = $row['uid'];
}
$mail_ui->get_load_email_data($uid, null, 'INBOX');
$bodytime = microtime(true);
$times += array(
$prefix.'login' => $logintime - $starttime,
$prefix.'listmailboxes' => $listmailboxestime - $logintime,
$prefix.'fetch' => $fetchtime - $listmailboxestime,
$prefix.'total' => $fetchtime - $starttime,
$prefix.'body' => $bodytime - $fetchtime,
//$prefix.'mboxes' => $mboxes,
);
unset($mboxes);