[SMARTY] Cycle is erg traag

Pagina: 1
Acties:

  • LuCarD
  • Registratie: Januari 2000
  • Niet online

LuCarD

Certified BUFH

Topicstarter
Ik maak gebruik van Smarty ( http://smarty.php.net ). Maar ik heb een beetje problemen met cycle, deze is ontzettend traag. Over 30 cycles doet hij 2,5 seconden terwijl hij zonder cycle in 0,4 seconden klaar is. :/

Heeft iemand ervaring met die probleem?

Dit is mijn template
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<TABLE width='100%' >
<TR><% math assign=totalpages  format="%d" equation="a / b +1" a=$list.total  b=$list.pagesize|default:1 %>
    <TD><% if $list.currentpage  > 1 %><A HREF="<% $SCRIPT_NAME %>?<% $list.prevpage %>"> &lt;&lt; </a><% /if %></TD>
    <TD ALIGN=CENTER>page <% $list.currentpage %> of  <% $totalpages %></TD>
    <TD ALIGN="RIGHT"><% if $list.currentpage < $totalpages %>
<A HREF="<% $SCRIPT_NAME %>?<% $list.nextpage %>"> &gt;&gt; </a><% /if %></TD>
</TR>
</TABLE>
<TABLE width='100%' CELLPADDING=1 CELLSPACING=0>
<TR VALIGN='TOP'>
<TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.firstname.querie %>'><% $list.header.firstname.name %></TD>
<TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.lastname.querie %>'><% $list.header.lastname.name %></TD>
<TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.department.querie %>'><% $list.header.department.name %></TD>
<TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.location.querie %>'><% $list.header.location.name %></TD>
<TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.extension.querie %>'><% $list.header.extension.name %></TD>
</TR>
<% cycle values="tabel,tabel2" print=0 %>
<% foreach from=$list.data item=rows %>
    <TR onmouseover="setPointer(this, 'over', '#DDDDDD', '#99CC99', '#FFCC99')"
onmouseout="setPointer(this, 'out', '#DDDDDD', '#99CC99', '#FFCC99')"
onmousedown="setPointer(this, 'click', '#DDDDDD', '#99CC99', '#FFCC99')"
VALIGN='TOP' CLASS='<% cycle %>'>
    <TD><% if $rows.emailadress != "" %>
<A HREF='mailto:<% $rows.emailadress %>' title="Email <% $rows.firstname %> <% $rows.lastname %>"><%/if%>
<% $rows.firstname %></a></TD>
    <TD><% $rows.lastname %></TD>
    <TD><% $rows.department %></TD>
    <TD><NOBR><% $rows.location %></NOBR></TD>
    <TD><% $rows.extension %></TD>
    </TR>
<% /foreach %>
</TABLE>

[ Voor 84% gewijzigd door LuCarD op 16-01-2003 17:08 ]

Programmer - an organism that turns coffee into software.


  • thomaske
  • Registratie: Juni 2000
  • Laatst online: 14-07 14:28

thomaske

» » » » » »

kijk even naar de file function.cycle.php in je plugins dir.. misschien kan je daar wat debug info neerzetten en kijken wat er zo vertraagt..

Brusselmans: "Continuïteit bestaat niet, tenzij in zinloze vorm. Iets wat continu is, is obsessief, dus ziekelijk, dus oninteressant, dus zinloos."


  • LuCarD
  • Registratie: Januari 2000
  • Niet online

LuCarD

Certified BUFH

Topicstarter
thomaske schreef op 16 januari 2003 @ 17:14:
kijk even naar de file function.cycle.php in je plugins dir.. misschien kan je daar wat debug info neerzetten en kijken wat er zo vertraagt..
Goed idee....
12: line 99: 0.00026798248291016
13: start cycle: 0.075392007827759
14: line 66: 0.00034201145172119
15: line 87: 0.00031697750091553
16: line 99: 0.00028204917907715
17: start cycle: 0.075199007987976
18: line 66: 0.00034797191619873
19: line 87: 0.00031602382659912
20: line 99: 0.00028002262115479
21: start cycle: 0.07538890838623
22: line 66: 0.00033700466156006
23: line 87: 0.00032007694244385
24: line 99: 0.00028002262115479
25: start cycle: 0.075432896614075
Het lijkt er op dat de meeste tijd gaat zitten in het starten van de functie dan dat functie bezig is. :/ ( Smarty Probleem? )

Programmer - an organism that turns coffee into software.