-
FEATURED COMPONENTS
First time here? Check out the FAQ!
By taking 5000 points (objects not string) , loading zul page very very slow
<searchbox id="points" model="@load(vm.points)" multiple="true" selectedItems="@bind(vm.selectedPoints)" itemConverter="@load(vm.pointConverter)" onSelect="@command('onSelectPoint')" autoclose="true">
<template name="model">
<label value="@load(each.name)"/>
</template>
</searchbox>
I simulate your case with https://zkfiddle.org/sample/3qpi7d9/1-searchbox-with-5000-objects
But it takes 3s to load in my local machine. zkfiddle takes 10s. Could you do a profiling according to https://www.zkoss.org/wiki/ZKDeveloper%27sReference/PerformanceMonitoring/StepbyStepTroubleShooting#JavaProfiling_Tool to locate which part (client or server) is the performance bottleneck?
If you never update each.name
dynamically during user interactions, you can use:
<label value="${each.name}"/>
or
<label value="@init(each.name)"/>
That will improve the performance immediately. see http://books.zkoss.org/zk-mvvm-book/9.5/advanced/performance-tips.html
You can remove the itemConverter
and test again to see if it's a bottleneck.
Asked: 2023-03-08 09:59:30 +0800
Seen: 8 times
Last updated: Mar 13