0

zk10 clientmvvm searchbox very slow with huge data

asked 2023-12-07 17:18:55 +0800

wastemails gravatar image wastemails
130 1 2

test.zul

<div apply="org.zkoss.clientbind.ClientBindComposer" viewModel="@id('vm') @init('blah.viewmodel.TestVM')">

<searchbox model="@init(vm.points)"  hflex="1" autoclose="true">
            <template name="model">
                <label value="@init(each.name)"/>
            </template>
        </searchbox>

</div>

TestVM

public class TestVM {

    @Getter@Setter private List<Point> points=new ArrayList<>();

    @Init
    public void init(){

        AtomicInteger index=new AtomicInteger(0);
        IntStream.range(0,10000).forEach(value -> {
            points.add(new Point("id"+index.getAndIncrement(),"name"+index.get()));
        });
    }

}
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-12-19 22:16:41 +0800

MDuchemin gravatar image MDuchemin
2480 1 6
ZK Team

Hey there,

Thanks for reporting this.

From an initial look, this is not related to client-mvvm, since the slowness is not related to a binding being fired.

In fact, the page loads much faster with client-mvvm compared to regular mvvm (which is where the binding happens). and both client-mvvm and regular mvvm have the same processing time when searching an item.

Instead, this is regular performance of the search function of the searchbox, which is quite slower with a large dataset.

I've posted a ticket to review the performance for searchbox with large dataset: https://tracker.zkoss.org/browse/ZK-5602

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2023-12-07 17:18:55 +0800

Seen: 6 times

Last updated: Dec 19 '23

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More