Re: [SMARTY] include() performance
| From: | Sujal Shah | Date: | Thu, 24 Oct 2002 16:32:10 +0000 |
| Subject: | Re: [SMARTY] include() performance | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6230@lists.php.net to get a copy of this message | ||
Doesn't that make sense...? I mean, include has to open up a file, snarf
it up, and then close it. Over and over and over and over......
I'm new to smarty, so I'm not sure if the template compiler inlines the
include call, so maybe that could be an optimization, but aside from
that, I would expect that to be slower.
sujal
On Thu, 2002-10-24 at 12:10, Ulf Wendel wrote:
> Hi,
>
> while I was looking at my application to find out why it's so "slow" I
> noticed that smarty caused quite some delays. I figured out that that my
> massive use of smarty's include function caused the delays. Due to a
> loop I was using upto ~200 includes per page.
>
> However, replacing the include function with the content of the included
> file was really a good idea:
>
> time per loop
>
> include: 0.3630 s
> without: 0.0133 s => ~ 27 x faster
>
> (the figure shows typical times for the first of up to 19 loops per page)
>
> How about adding a note to the docs?
>
> Ulf
>
> --
> WWE e-commerce IT GmbH, http://wwe.biz
> Eiffestrasse 462, D-20537 Hamburg
> Tel: 040 / 25 30 65 9-0, Fax: 040 / 25 30 65 950
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
---- Sujal Shah --- sujal@sujal.net ---
http://www.sujal.net
Now Playing: none