Menu

#1600 Optimize the HtmlMacroComponent

5.0.7
closed
nobody
5
2011-06-14
2011-06-13
Tony Wang
No

The performance is not very well ,if you are using macro component a lot.

index.zul
------
<?component name="myzul" macroURI="myzul.zul"?>
<zk>
<html><![CDATA[
<ol>
<li>Drag the scroll bar several times.</li>
<li>Sometimes the listbox show a empty content.</li>
</ol>
]]></html>
<zscript><![CDATA[
import java.util.*;
import org.zkoss.zul.*;
List list = new ArrayList();
for (int i = 0; i < 1000; i++)
list.add("item " + i);
]]>
</zscript>
<zscript>
Date d= new Date();
</zscript>
<zk forEach="${list}">
<label value="${each}" />
</zk>
<zscript>
Date ed= new Date();
System.out.println(ed.getTime() -d.getTime() );
d= new Date();
</zscript>

<zk forEach="${list}">
<imageDetails num="${each}" />
</zk>
<zscript>
ed= new Date();
System.out.println(ed.getTime() -d.getTime() );
d= new Date();
</zscript>

</zk>

-------------
myzul.zul
-------
<zk>
<label value="${arg.num}" />
</zk>

Discussion

  • Tony Wang

    Tony Wang - 2011-06-14

    Ready since 2011/6/14

     
  • Tony Wang

    Tony Wang - 2011-06-14

    Accepted feature

     
  • Tony Wang

    Tony Wang - 2011-06-14
    • status: open --> closed
     

Log in to post a comment.