I use glob to match some files, these files are saving in same folder, the following code will be executed more than once, because dirname is same, it make performance issues, the code at gaze.js line 289 in _addToWatched function.
var readdir = fs.readdirSync(dirname);
for (var j = 0; j < readdir.length; j++) {
var dirfile = path.join(dirname, readdir[j]);
if (fs.lstatSync(dirfile).isDirectory()) {
helper.objectPush(this._watched, dirname, dirfile + path.sep);
}
}
I use glob to match some files, these files are saving in same folder, the following code will be executed more than once, because dirname is same, it make performance issues, the code at gaze.js line 289 in _addToWatched function.