slow selectbox rendering

T

Tole

hi all,
i've got a selcetbox (multiple) which is filled by javascript. only problem
is that i have aprox 1000 options to add to that select, and that adding
lasts for 5-6 seconds. Even select.length = 0 (on filled element) lasts for
few seconds.

ok. i have large amount of data to preload, and i also do some operations on
that data, but it's all very fast.
so i thought it must be some IE rendering issue, and i tried to set
select.style.display = 'none' during the adding, and still it is slow.

anybody had similar problems? is there any speedup trick?

tole
 
H

Hywel Jenkins

hi all,
i've got a selcetbox (multiple) which is filled by javascript. only problem
is that i have aprox 1000 options to add to that select, and that adding
lasts for 5-6 seconds. Even select.length = 0 (on filled element) lasts for
few seconds.

ok. i have large amount of data to preload, and i also do some operations on
that data, but it's all very fast.
so i thought it must be some IE rendering issue, and i tried to set
select.style.display = 'none' during the adding, and still it is slow.

anybody had similar problems? is there any speedup trick?

I reckon you just need to find another way of doing this. 1000 options
in a select is far too many - imagine havong to go through them to find
what you're after. Then imagine having to download the thing.

What does the select do?
 
T

Tole

Hywel said:
I reckon you just need to find another way of doing this. 1000
options in a select is far too many - imagine havong to go through
them to find what you're after. Then imagine having to download the
thing.

What does the select do?

Actualy i have 8 selectbox pairs on that page (selectbox pair -> on click
user moves option from left select to right select) and they all have
connection between (if you select something on first it changes content of
the others selectbox pairs)

The one with 1000 elements is last one, and it shows 1000 elements only if
in all other selectboxes all options are selected.
So mainly users will not see all of them, but in some cases they will have
to.
Also, problem is that default is (onload) all selected.

It's quit interseting matter, and i had lot of fun developing it, but at
last i found that that option adding is the slowest part, and i dont know
how to solve it.

i have posible solution to render all options in html, but then i will have
duplicate data loading (same data for js, and same for html), and i'll need
also to catch options references off all options, and that seems like no
good solution.


tole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top