Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Best way to empty a listbox with large amounts of data

Reply
Thread Tools

Best way to empty a listbox with large amounts of data

 
 
Erik
Guest
Posts: n/a
 
      10-31-2007
Hi Everyone,

I have filled a div with around 10000 items of data. I have got it loading
in around 2 seconds but when I come to empty the div by setting innerHTML to
"" it takes ages, about 20 seconds to clear.

Can anybody tell me a quicker way of clearing the contents of a DIV. I have
also tried wrapping the content in another DIV and then simply removing the
DIV from the DOM but it takes the same amount of time.

Many thanks


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      11-01-2007
in IE every dom node is a com object that needs to be released. you
really have too mush data for a div. one thing you could try is an
iframe. IE has probably better optimized the destruction of an entire
page. in this case you just set the src to 'blank.htm'.


you could also try your own optimized release. do a reverse tree walk
and delete the nodes bottom up, last child first, though this many
iterations of the dom may be the actual problem. (i'd of though IE would
do it this way)

-- bruce (sqlwork.com)

Erik wrote:
> Hi Everyone,
>
> I have filled a div with around 10000 items of data. I have got it
> loading in around 2 seconds but when I come to empty the div by setting
> innerHTML to "" it takes ages, about 20 seconds to clear.
>
> Can anybody tell me a quicker way of clearing the contents of a DIV. I
> have also tried wrapping the content in another DIV and then simply
> removing the DIV from the DOM but it takes the same amount of time.
>
> Many thanks
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opinion: Optimal way of holding large amounts of data between pages? David ASP .Net 0 06-21-2006 08:08 PM
HTTP POST to send large amounts of data? Bint HTML 1 03-19-2006 02:11 PM
transferring large amounts of data Andersen Java 2 11-03-2005 03:16 AM
What is the best email program for handling large amounts of incoming mail that needs to be filtered? C. B. Computer Support 19 04-13-2004 11:03 PM
Using Dataset for large amounts of data Brent ASP .Net 3 04-07-2004 01:43 PM



Advertisments