Hacker News new | ask | show | jobs
by iwillreply 4834 days ago
Why would you append on every loop. Rather than build the string and then append the whole lot on one block?

If you compare the DOM of the original fiddle and the DOM of following the fiddle I posted. You will see they are the same.

I'm not saying what I referenced is the 'best' way of doing things. But that the debate in the original article (based on the provided examples) is pretty null.

1 comments

You're right, my example was different. But upon fixing it to match the original article's example, but with jQuery creating the dom nodes, it is still slower

http://jsfiddle.net/EmEhRKay/YNxEK/13/