Re: Recycle Smarty objects = fast?

From: Date: Thu, 15 Nov 2001 21:27:32 +0000
Subject: Re: Recycle Smarty objects = fast?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1921@lists.php.net to get a copy of this message
Well, the approach is to have ONE exemplar of Smarty class in a PHP script, and to use it everywhere instead of creating new object in a function. <? function display_guestbook(){ global $smarty; $smarty->display("guestbook.html"); } ?> Alex. > hmmmmm > could you guys explain? > examples please? > thanks > Jorge >> -----Original Message----- >> From: Bertrand DUNOGIER [mailto:bdunogier@wanadoo.fr] >> >> It is what I'm doing since the beggining... >> >> AJ> I was thinking of creating one or two global Smarty objects, >> and use the >> AJ> same object over and over, instead of creating a new temporary Smarty >> AJ> object in every function that needs to generate output. >> AJ> It is not a 'clean' solution, but I imagine it will be a lot >> faster. Any >> AJ> thoughts? >> > --- > You are currently subscribed to smarty as: alex@lists.com > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/

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