I know there’s been some talk about adding streaming readdir() to libuv recently, but that’s of little use to you now. There are also some modules (like Thorsten Lorenz’s readdirp) that have streaming interfaces, but that only works if you want a recursive readdir(); it’s no help if you’ve got one enormous directory (like you do). Unless you want to write your own native module that follows the approach described in that libuv thread, I think you’re out of luck. Sorry! :/
F
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAETHeihHkaQAbj9Ug5MMeNR6MHPR%3DfV21F%3DaMYMHQ-cNsQakPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHG3qKoE484fVCmP5Tzqwv-G1k82Z%2B0OMypt7vc%3D_UA%2B2gBtig%40mail.gmail.com.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/679b911a-93f9-4e99-b09b-b502b8e68f91%40googlegroups.com.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/2b131db2-d83c-411a-9963-7452044dafdc%40googlegroups.com.
Pipes vave limites sizes in Linux:
https://www.google.com.br/search?q=linux+pipe+size+limit&oq=lonux+pipe+size+limit&aqs=chrome.1.69i57j0l3.14217j0j4&client=chrome-mobile&sourceid=chrome-mobile&espv=1&ie=UTF-8
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAPJ5V2YHp8eBW5rd77DjX%2BYxwc%2Bqtff1s0E4sNRwz6cyHBkafw%40mail.gmail.com.
You may also run into perf problem with the file system itself. How well does it cope with 1M+ entries per directory?
var ez = require('ez-streams');var cp = require('child_process');var reader = ez.devices.child_process.reader(cp.spawn('ls'), {encoding: "utf8"}).transform(ez.transforms.lines.parser())// just check that it worksreader.pipe(_, ez.devices.console.log);
It will handle the backpressure on the child process standard output.