Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] display() and fetch() - a problem
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=sma...23513623346&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

Report this thread to moderator Post Follow-up to this message
Old Post
Boots
04-14-05 08:59 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:09 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.