Shopify/batman — pull request #180 by hornairs (2011-10-13 23:06:27+00:00)
Title: Begin foreach optimization: Make Iterator pop the stack every 50 ms.

See #144

This is the first of a few things we can do to make the insertion of large incoming batches of data smoother. `Iterator` now queues all its actions internally and processes all it can but popping the stack via `$setImmediate` every 50 ms. This is similar to `parseNode`.

The next planned change is to make the code in `readAll` which creates records from incoming JSON do a similar task as the `fromJSON`ing of all those records seems to be a big part of the UI block according to my profiling.