Slow performance checking smarty->is_cached

From: Date: Sun, 23 Feb 2003 23:39:04 +0000
Subject: Slow performance checking smarty->is_cached
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8144@lists.php.net to get a copy of this message
Hi, Experiencing lockups or slow behavior during smarty->is_cached checks. From 0 to several seconds delay. Subsequent is_cached checks of the same template file are very quick (.01 seconds). Of 5 templates checked per page, perhaps 2 or so will exhibit this delay. Happens every time if the server is stressed at all. Using Redhat 7/PHP4.3.0/Smarty 2.4.2/Apache 1.3.27. Problem is occuring around line 2300 in Smarty.class.php with this code: foreach ($this->_cache_info['template'] as $template_dep) { $this->_fetch_template_info($template_dep, $template_source, $template_timestamp, false); if ($this->_cache_info['timestamp'] < $template_timestamp) { // template file has changed, regenerate cache return false; } } It seems to be running around 200 iterations, taking its time with each. Is there some coding style or optimization that I can make to speed this code up? Thanks Jason.

« previous php.smarty.general (#8144) next »