Skip to content

Instantly share code, notes, and snippets.

@Ginden
Created August 19, 2014 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ginden/fac4f513867359e3f567 to your computer and use it in GitHub Desktop.
Save Ginden/fac4f513867359e3f567 to your computer and use it in GitHub Desktop.
var bigArray = createBigArray(500000);
var maxPerTick = 200;
setTimeout(function notWow() {
var n = maxPerTick;
var el;
while (bigArray.length && n--) {
el = bigArray[--bigArray.length];
process(el);
}
setTimeout(notWow, 100);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment