Open archupsg03 opened 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
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