oleics / node-filewalker

Fast and rock-solid asynchronous traversing of directories and files for node.js
67 stars 8 forks source link

Hangs after scanning 19k files #16

Open archupsg03 opened 7 years ago

archupsg03 commented 7 years ago

My directory has 10k files, and am using the below code

var started = Date.now(); var cnt = 0; var filewalker = require('filewalker');

var options = { maxPending: -1, maxAttempts: 3, // attemptTimeout: 10000, // recursive: true, // matchRegExp: /.(log)$/, // matchRegExp: /.(json)|(md)$/, };

filewalker('/home/archupsg03/test_dir') .on('file', function(p, s) { cnt = cnt + 1; console.log('%s', p); console.log('%d', cnt) }) .on('done', function() { var duration = Date.now()-started; console.log('%d ms', duration); }) .walk();

Scan of directory hangs after 19k files. OS - linux