From 0c1ae69b549ad108ce21d37623ade8c9db5446cd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 1 Aug 2005 23:13:58 +0000 Subject: [PATCH] r339: - cache templates - fixed an issue in search.tpl where the sortby had a typo - add microtimer to template caching --- global.php | 4 ++++ search.php | 3 ++- showreport.php | 4 +++- templates/search.tpl | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/global.php b/global.php index d984250..3943be7 100755 --- a/global.php +++ b/global.php @@ -83,8 +83,12 @@ $globaltemplates = array( 'bugfield_select_single' ); +$start = microtime(); + $template->cache(array_merge($globaltemplates, (array)$fetchtemplates)); +$bugsys->debug('time for tpl cache: ' . $funct->fetch_microtime_diff($start)); + eval('$header = "' . $template->fetch('header') . '";'); eval('$doctype = "' . $template->fetch('doctype') . '";'); eval('$headinclude = "' . $template->fetch('headinclude') . '";'); diff --git a/search.php b/search.php index d1e7f8d..f49d109 100644 --- a/search.php +++ b/search.php @@ -13,7 +13,8 @@ $fetchtemplates = array( 'search', 'pcv_select_row', - 'search_results' + 'search_results', + 'trackerhome_bits' ); define('SVN', '$Id$'); diff --git a/showreport.php b/showreport.php index e5b9321..e47dea7 100644 --- a/showreport.php +++ b/showreport.php @@ -15,7 +15,9 @@ $fetchtemplates = array( 'showreport_attachment', 'showreport_comment', 'quicksearch', - 'pcv_select_row' + 'pcv_select_row', + 'customfield_bit', + 'bugfield_static_text' ); define('SVN', '$Id$'); diff --git a/templates/search.tpl b/templates/search.tpl index 4ca095e..7b6ba51 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -41,7 +41,7 @@ $header