-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
8.0.5
-
None
Steps to Reproduce
(not complete, extracted from https://forum.zkoss.org/question/111180/popup-dynamic-menu-performance/)
1. load a zul with a 5 levels menu, 600 menuitems in total
<menu label="Put data" visible="@load(vm.ownMu)" image="/images/documents.png"> <menupopup children="@bind(vm.reportModel) @template(each.childCount eq 0?'menuitem':'menu')"> <template name="menu" var="menu"> <menu label="@bind(menu.name)" visible="@load(menu.visible)"> <menupopup children="@bind(menu.children) @template(each.childCount eq 0?'menuitem':'menu')" /> </menu> </template> <template name="menuitem" var="item"> <menuitem label="@bind(item.report ? ''.concat(item.reportData.idreport).concat('. ').concat(item.reportData.shortnamereport):item.name)" onClick="@command(item.report ? 'reportClicked' : '', node=item.reportData)" image="@bind(item.report ? '/images/Excel-16.gif' : '')" disabled="@load(not vm.reader)" visible="@load(item.visible)" /> </template> </menupopup> </menu>
Current Result
performance problem.
the user said it takes 10 min to load the page.
Expected Result
shorter creation time
Workaround
replace the children binding with <forEach>