Re: [SMARTY] display() and fetch() - a problem

From: Date: Thu, 14 Apr 2005 01:23:45 +0000
Subject: Re: [SMARTY] display() and fetch() - a problem
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12484@lists.php.net to get a copy of this message
Hi. I believe the difference is that fetch() uses output buffering. An idea that you can consider is to override display() in your custom smarty class with something like: function display($resource_name, $cache_id = null, $compile_id = null) { echo $this->fetch($resource_name, $cache_id, $compile_id); } There is an old thread which may or may not be of interest: http://marc.theaimsgroup.com/?l=smarty-dev&m=105223513623346&w=2 xo boots --- Brian Jones <mojobojo@gmail.com> wrote: > A page that has been developed in our environment takes on average > 0.5 > seconds to load on our average desktop, including the display() call. > > Unfortunately, some of our users were experiencing up to 18 seconds > load time. After replacing the display() call with fetch(), the > trouble user load times came back down to reasonable levels. > > I wish I could say we have narrowed down what may have caused this, > but the problem occurs randomly on Windows 2000 boxes, Windows XP > boxes, and using either Firefox or Internet Explorer. It was > consistant on the machine which had the problem regardless of the > browser used. I would also like to note that the users have roaming > profiles, and they logged into machines that seem to work and had no > issues. > > Our server environment is IIS 6 on Windows 2003 Server, running PHP > Version 4.3.10. The php.ini is stock in regards to any kind of > values > that specify timeouts/sizes/etc. > > The only difference made which appeared to fix the problem was again, > switching a display() call to echoing out a fetch() call. I'd hate > to > end up having to rely on fetch() this whole time, especially because > the default output from a stock Smarty install doesn't display > debugging info (we hacked the code to include this for the time > being). > > Does anyone have any ideas what may be going on here, and why > display() is apparently hanging on random machines (yet > consistantly)? > > > Brian "bojo" Jones > > -- > the philosophy of bojo - http://www.mojobojo.com/ > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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