Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JS createDocumentFragment to avoid reflow
// http://www.slideshare.net/nzakas/high-performance-javascript-amazon-devcon-2011
var list = document.getElementsByClassName('items')[0],
fragment = document.createDocumentFragment(),
i, item;
for (i=0; i < 10; i++) {
item = document.createElement('li');
item.innerHTML = 'item #'+i;
fragment.appenChild(item);
}
list.appenChild(fragment);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.