How can I execute a callback after a massive multiple insert with Mongoose?
I have an object
results that's very large (maybe over 1,000 items). I'm iterating over it to save to the DB but this seems very inefficient:
for result in results item = new Item result item.save()
Is there a more optimal way to do this and THEN get a Callback as opposed to a callback for EVERY save?
The async module will help a lot with this. You're probably looking for a queue.
You may be getting near the edge of a the normal Node.js use case.