OZONE Asylum
Forums
DHTML/Javascript
IE JS/DOM performance degradation weirdness
This page's ID:
27610
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Thanks for the replies! (_Mauro, you are/were InI? ;) ) To clarify, the time it takes to do all that stuff is <i>increasing</i> by 500 msec each time. It takes <1 second to do in Firefox, 1.5 seconds perhaps in IE the first time.. and every subsequent page is +500 msec after that in IE (eg. 2 seconds for page 2, 2.5 seconds for page 3, etc.) I am cloning an offline (referenced within JS, but not appended to document.body) collection of nodes, doing all the work and finally doing a single append (as opposed to appending each node individually, just do the parent that holds them all) to the body - which seems to be pretty fast as you mentioned, so the browser only reflows once (similar to doing .innerHTML, logically.) From what I've found, it seems that it's "walking the DOM" that is being slowed the most. Assuming this is related to the number of elements in the document (and even then, it seems odd given I'm trying to control scope etc.), it's a bit disturbing that even "offline" elements appear to be considered at this point. I was looking into documentFragment ideas also, I'm going to investigate this further. The idea of separating "offline" nodes further from the local document's DOM sounds crazy enough that it might just work. I wonder if there's any difference between a JS object in memory like someNode = document.removeChild(div); and someDocumentFragment.someNode, though. [small](Edited by [url=http://www.ozoneasylum.com/user/2276]Scott[/url] on 03-08-2006 18:15)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »