> Yeah, all that DOM creation will take a while - 
> especially if you use a convenience plugin like mine.
>
> I get much better performance across browsers 
> with [].join('') and innerHTML.

There don't seem to be that many situations where DOM creation is the
performance bottleneck though. Probably the one one where I've seen a real
difference is using ajax to fill a large table. Even in this case it turned
out to be a $(".class") selector in a loop and not DOM creation. One trick
I've used that speeds up DOM creation is to create an element and then use
.cloneNode on it rather than create a new one each time.

Most of the comparisons between innerHTML and DOM are inherently unfair
because the innerHTML examples don't guard against malformed HTML strings.
If a user enters a special character like a quote, the string doesn't parse
properly. With innerHTML there's the risk of cross-site scripting attacks as
well if input is being accepted from the user, the URL, or unfiltered
database results. 



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to