|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
hromi Smarty n00b
Joined: 17 Oct 2003 Posts: 2
|
Posted: Fri Oct 17, 2003 6:46 pm Post subject: weird template load times |
|
|
i have a problem when trying to display results of a database query (discussion board submissions)
i am using php 4.3 + php accelerator, apache 2 & smarty template engine
i'm just coding & debugging so I'm using only very simple template to which array with forum submission texts is assigned and then displayed using {foreach}
I'm using php microtime php function for showing execution times
when I display a forum with submissions which are short(only few sentence long submissions), or when I display forum with long submissions in lynx browser, execution times are ok, around 0.01s
but when I try view forum with long many-paged submissions in IE, execution time or load time from smarty debugging console is almost all the time higher then 2s which is really not good ;(
it seems to me really weird that execution time is influenced by browser I use, I was trying to find & solve the problem for few hours but I really do not know where it can be. I guess somewhere in the apache, can it be so that it sends data to browser in parts and terminates the script only when client gets it all?
sounds crazy,but really the type of browser im using on client influences the execution time on server... |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Oct 17, 2003 6:52 pm Post subject: |
|
|
...don't bother timing when you have debugging turned on Indeed, try again with debugging turned off. |
|
Back to top |
|
hromi Smarty n00b
Joined: 17 Oct 2003 Posts: 2
|
Posted: Mon Oct 20, 2003 8:10 pm Post subject: |
|
|
well i have this code
1st step:: echo "<br><br><br>whole time:".SubStr((Time()+SubStr(MicroTime(),0,-$timer_start),0,7);
2nd step:: $smarty->display('indexbig.tpl');
echo "<br><br><br>whole 3rd step:: time:".SubStr((Time()+SubStr(MicroTime(),0,-$timer_start),0,7);
and output is like this (when using IE or opera)..sometimes the time in 3rd step is even bigger like 8 seconds or so
1st step:: whole time:0.01557
2nd step:: lot of blah blah blah )
3rd step:: whole time:2.54612
or when using lynx
3rd step:: whole time:0.53145
so the time problem should be somewhere in display()
here is that indexbig.tpl (just in case some good soul would like to help me)
Hello, {$node.node_name}!
{if $user_id eq 0}
{include file="loginbox.tpl"}
<br><br>{$error}
{/if}
{foreach from=$children_array item=child}
autor:: {$child.login}
{if $child.user_action neq 0}
&lokacia :: <a href='/{$child.user_action}'>{$child.user_action}</a>
{/if}
<br>
{$child.node_content}
<br><br>
{/foreach} |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|