node-filewalker icon indicating copy to clipboard operation
node-filewalker copied to clipboard

Hangs after scanning 19k files

Open archupsg03 opened this issue 7 years ago • 0 comments

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

archupsg03 avatar Jul 11 '17 12:07 archupsg03