slow selectbox rendering

Discussion in 'Javascript' started by Tole, Jul 11, 2003.

  1. Tole

    Tole Guest

    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
     
    Tole, Jul 11, 2003
    #1
    1. Advertising

  2. In article <bemch5$6raq3$-berlin.de>,
    says...
    > 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?

    --
    Hywel Never knowingly understood
    http://hyweljenkins.co.uk/
    http://hyweljenkins.co.uk/mfaq.php
     
    Hywel Jenkins, Jul 11, 2003
    #2
    1. Advertising

  3. Tole

    Tole Guest

    Hywel Jenkins wrote:
    > In article <bemch5$6raq3$-berlin.de>,
    > says...
    >>
    >> 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?


    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
     
    Tole, Jul 11, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew
    Replies:
    3
    Views:
    3,817
    Natty Gur
    Aug 6, 2003
  2. Replies:
    2
    Views:
    2,204
    Mark Parnell
    Aug 24, 2004
  3. Bodidily
    Replies:
    0
    Views:
    461
    Bodidily
    Aug 25, 2004
  4. Si
    Replies:
    1
    Views:
    653
  5. shankwheat
    Replies:
    2
    Views:
    151
Loading...

Share This Page