Scalable div appending

Ridiculously Slow – being silly

for (var i = 0; i < 65000; i++) {

Fast – using a DocumentFragment

var fragment = document.createDocumentFragment();

for (var i = 0; i < 65000; i++) {


Probably obvious for most, but not for me on a Friday evening after working all day. 😛

Published by


Senior software engineer with extensive experience in enterprise software development targeting wholesale financial organisations and cloud solution providers.

Leave a Reply

Your email address will not be published. Required fields are marked *