Extremely slow with antivirus
See original GitHub issueThe company I work for requires that I run some horrible (but somehow popular) antivirus software on my PC which makes my eslint .
take nearly 30 seconds to run on a very small project.
I did a little investigating and all of that slowness occurs in glob-util.js
in the call to glob.sync(pattern, globOptions)
. If I modify globOptions to include ignore: 'node_modules/**'
my linting drops to one second.
It appears that crawling node_modules causes my antivirus to kick in for each file, and I’m assuming I can’t be the only one with this problem. In any case, filtering out node_modules before the glob.sync call should certainly speed things up to some degree for everyone.
I understand that there is some complex logic involved with ignoring and unignoring paths so I see why all node_modules paths are included at this point in the code, but is there a chance this could be handled in some other way that would short-circuit the needless crawling? It would be a massive 99% speed increase, at least for me and anyone else in my position.
Issue Analytics
- State:
- Created 7 years ago
- Comments:43 (24 by maintainers)
Top GitHub Comments
From the looks of it this could be a huge performance improvement. Provided nobody else wants to solve it in the near future, I’ll take a look at it until the end of the week.
This doesn’t solve my own problem, which is that the huge ignored directory is
logs/
, notnode_modules/
…