0

Combobox issue :Taking time to load

asked 2016-09-13 11:58:08 +0800

psingh gravatar image psingh flag of India
963 8

I am using zk combo box with template and having 18500 data to load, but when I try to load that much data, I got proxy error 502:: it is taking too much time to load the data. I am using the below code

<combobox width="100%"  autocomplete="true"  model="@load(vm.streetList)"  
                                        selectedItem="@bind(vm.selectedStreetName.value)"
                                        autodrop="true">

                                        <template name="model"
                                            var="each">
                                            <comboitem
                                                label="@load(each.value)" value="@load(each.value)" description="@load(each.label)"/>
                                        </template>

</combobox>

Can anyone help me out to resolve that issue so that larger data can be loaded without any performance issue?

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-13 13:12:55 +0800

Darksu gravatar image Darksu
1991 1 4

Hello psingh,

You could use a bandbox in order to control the number of records that will be displayed as shown below:

https://www.zkoss.org/zkdemo/combobox/customizable_combobox

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-09-15 03:47:34 +0800

avanish240288 gravatar image avanish240288
11

Hi Darksu,

In our case we can't use the bandbox,so please suggest any other solution.

link publish delete flag offensive edit

Comments

18500 entries in a combobox? How is this supposed to make sense? How is anyone ever supposed to scroll through that? The best solution here is to choose (or code) a different way of input...

FlorianSchaetz ( 2016-09-15 06:53:36 +0800 )edit

@avanish240288 which case you are using 18500 data in combobox. why you are not using mostcommonuse table for that. when user type something first it will search in mostcommon table then if not available it will go for master table.

hswain ( 2016-09-20 17:35:16 +0800 )edit
0

answered 2016-09-16 08:31:16 +0800

Darksu gravatar image Darksu
1991 1 4

Hello psingh,

if you use ZK EE version, Combobox won't create comboitem when loading page, so the loading time is short, and it will not crash.

For example use the following code:

<window title="Test" border="normal">
 <zscript><![CDATA[
   List  strset = new ArrayList();
   for (int i = 0; i < 20000; i++) {
       strset.add("" + i);
   }
 ]]></zscript>
<combobox>
    <comboitem label="item ${forEachStatus.index}" forEach="${strset}"></comboitem>
</combobox>
</window>

But again the data size is huge and will slow down the performance, thus please consider a different approach.

Best Regards,

Darksu

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: 2016-09-13 11:58:08 +0800

Seen: 41 times

Last updated: Sep 16 '16

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