cyjake / darko

🐰A Node.js port of Jekyll
82 stars 16 forks source link

Access files in batch to prevent EMFILE error #1

Closed cyjake closed 10 years ago

cyjake commented 10 years ago

Node.js has limits on opening file descriptors, see https://github.com/joyent/node/issues/5401

I've got two options, 1) use graceful-fs as a drop in replacement of built-in fs module; 2) access files in batch, keep the total opened file descriptors below the red line.

Guess I'll give the second option a try.