replace icon indicating copy to clipboard operation
replace copied to clipboard

Use concurrency limit to prevent EMFILE errors

Open stuartpb opened this issue 12 years ago • 2 comments

Something like

var queue = require("queue-async")
var q = queue(opts.concurrency || 250)
// ... for each file ...
q.defer(replace)
//before terminating
q.awaitAll()

stuartpb avatar Jan 24 '13 05:01 stuartpb

Of interest: https://github.com/isaacs/node-graceful-fs

stuartpb avatar Jan 26 '13 00:01 stuartpb

Thanks. Interestingly, I tried graceful, and it was slower than synchronous on most code bases I tried. I just kind of accepted it and didn't dig into it too hard.

harthur avatar Jan 26 '13 00:01 harthur