Re: <select>.remove() Performance and Necessity

Hi Rob

RobG wrote:
You mean 3,000 option elements? Do you really want to do that?

I have only recently stumbled across the school of thought that says
JavaScript and HTML are more than capable of providing the functionality and
performance needed for a complete browser-based application GUI, so I
thought it was time that I educated myself a little bit about the potential
of these tools. To that end I've built a proof-of-concept example, one part
of which is the loading a database-query result-set into a scrolling list.
Now, I imagine 99% of the time we'd be talking 10s to low 100s of matching
rows, but I don't think 3000 is ridiculous or out of the realms of
possibility. (Especially as the user is empowered (by the hot abort button)
to terminate the query at any time, if they so choose. The "All transactions
between a certain date range" scenario.)

Adding 3,000 options takes Safari 750ms, Firefox 220ms and Opera

Thanks for the example code and real figures. I know I should've done that.

Your code on my box takes 20910ms to add 3K and 4907ms to remove them :-(

The second and subsequent times the "add" consistently took ~5600ms and the
"remove" stayed at 4860ms.

Does anyone else have IE7 that they can run Rob's code on to check?

Ask MS to fix their browser.
: : : :
Ditch IE?

Certainly looks the way to go. What could it possibly be doing with all that
CPU? Bitmap or hash algorithm for *every* free byte in memory?

Ok, going forward, can I run FireFox on my Windows2000 box and have it
co-exists happily with IE? (IE in one window, FF in another?)

Cheers Richard Maher


Relevant Pages

  • Re: Parsing JavaScript to prevent maliciousness?
    ... I'm working on a site that is implementing similar functionality to _A ... Certain Large Social Networking Site_'s Apps feature. ... Application developers will be able to write apps in a hybrid HTML / ... Allowing access to some JavaScript functionality while stripping out ...
  • Re: New to PHP, what to do?
    ... in my classes at school i attend javascript and ... HTML, but now i want to take the next step. ... Learning PHP! ...
  • New to PHP, what to do?
    ... I'm new to scripting, in my classes at school i attend javascript and HTML, but now i want to take the next step. ... Learning PHP! ...
  • Re: jQuery vs. My Library
    ... Web developers are copying bad ideas and practices and doing what they're told by managers who do not have any business to do the telling. ... most sites nowadays don't require javascript, but are authored in such a way that if the user has javascript turned off, then the site does function. ... No matter what project, if the project involves writing rich functionality in the browser, then there is going to be a need to write javascript functionality and that functionality will be best organized into abstractions. ...
  • Security holes in Hotmail, Yahoo, and other webmails
    ... Most webmails services and applications have huge security holes on the ... execution of malicious javascript and HTML code ... some parts of the user's mailbox, without use of javascript. ... Cross-site scripting vulnerabilities on the domain was reported ...