Re: [SMARTY-DEV] Re: [SMARTY] Re: Template execution time
| From: | Wom.bat | Date: | Mon, 12 May 2003 19:02:19 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: [SMARTY] Re: Template execution time | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1449@lists.php.net to get a copy of this message | ||
gnah... wrong list ;/
----- Original Message -----
From: "Wom.bat" <wom.bat@gmx.net>
To: <smarty-dev@lists.php.net>
Sent: Monday, May 12, 2003 8:10 PM
Subject: [SMARTY-DEV] Re: [SMARTY] Re: Template execution time
> I usually do
>
> $output = fetch(...);
> echo str_replace("%%__exectime__%%", $timer->stop(); $output);
>
> David
>
> ----- Original Message -----
> From: "pt2002" <pt2002@mail.pt>
> To: <smarty-general@lists.php.net>
> Sent: Monday, May 12, 2003 5:50 PM
> Subject: [SMARTY] Re: Template execution time
>
>
> > Hi,
> >
> > thanks for your answers but my problem isn't really measure the time. I
> have
> > a "timer" class to do that.
> > The problem is how to force Smarty always measure script execution even
if
> > the template is cached.
> >
> > An example: the first time template is shown, it takes 1 second.
> > Second time, template is cached, it takes 0,5 seconds but, because it is
> > cached it still show 1 second and I want to show the real time it takes
to
> > be generated.
> > I don't know if explain correctly but my english is poor.
> >
> > TIA
> >
> >
> >
> > "Pt2002" <pt2002@mail.pt> escreveu na mensagem
> > news:20030512140314.96254.qmail@pb1.pair.com...
> > > Hi
> > >
> > > I need to show at the end of the page something like "This page took n
> > > seconds to be generated" even if the template is cached.
> > >
> > > I can do:
> > >
> > > $ini = time();
> > >
> > > $tpl = new Smarty();
> > >
> > > if (!is_cached("test.tpl") {
> > > $tpl->assign("var1", "xpto")
> > > ...
> > > }
> > >
> > > $tpl->display("test.tpl");
> > >
> > > How can I show the execution time at end of the page?
> > > TIA
> > >
> > >
> >
> >
> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>