[jQuery] Re: Faster then innerHTML

2007-09-13 Thread Brandon Aaron
Yeah it isn't a very fair comparison. There is a lot that goes on to solve cross-browser issues and memory leaks. For example, jQuery removes each child node and its events. The replaceHtml function is a really nice optimization and could easily be made into a plugin if desired. (untested but shoul

[jQuery] Re: Faster then innerHTML

2007-09-13 Thread Steve L.
John, I slapped this modified version of my test page together in a couple minutes: http://stevenlevithan.com/demo/replaceHtml_jQuery.html jQuery.html() seems to perform pretty terribly, to be honest. The 15,000 element "destroy & create" test in IE7, for example, is over 500 times slower than r

[jQuery] Re: Faster then innerHTML

2007-09-12 Thread John Resig
You're in luck! jQuery already pre-empties an element inside .html(). Calling .html() actually does: .empty().append("html string"); Although, there's a lot of other issues at play inside .append() in order to make it work cross browser, so those innerHTML benefits have probably be nullified in

[jQuery] Re: Faster then innerHTML

2007-09-12 Thread Sean Catchpole
Excellent, I'll look into this. ~Sean On 9/12/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > > Here is an interesting blog post that I came across: > > http://blog.stevenlevithan.com/archives/faster-than-innerhtml > > The synopsis basically is that one can gain dramatic speed improvements o