Internet Explorer. Inserting HUGE html data to control innerHTML.

B

borisov.gleb

wp.prototype.loadHtmlToCtrl = function (ctrl, html) {
alert(1);
ctrl.innerHTML = html;
alert(2);
}

5-10 seconds between two alerts depends on string length. It's only IE
bug. FF and Safari3 works fine.

Maybe anyone knows how I can insert huge HTML data faster? (100-400Kb
one time and 10-20Kb many times).

Thanks for advice.
All the best, Gleb M. Borisov.
 
B

borisov.gleb

What makes you think this is a bug? Sounds like a performance issue to me.




That doesn't sound so HUGE. Perhaps it is the complexity and not the size
that is the problem?

You can't get any faster than innerHTML. Do you have to insert the whole
thing at once or can you do it a little at a time? If you can break it up
into stages, you can use setInterval. It won't actually speed it up, but
will allow you to update a progress bar or something like that. You might
want to hide the containing element during the operation as you probably
don't want the user to interact with the partially rendered HTML.

Now I'm trying to split content and insert it to element with some
intervals via setTimeout.
Anyway, thanks for reply.

All the best, Gleb M. Borisov.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top