xo: Too slow on large projects
Description
I am using XO and Ava in a large project. Both packages are too slow to be used. I never actually tried to let them finish. I usually give up after 10+ minutes. I first thought this might be related to globby: https://github.com/sindresorhus/globby/issues/43
As mentioned in that issue I created a test source that reproduces this issue. The glob targets a folder that exists only once.
I opened a separate issue in Ava. https://github.com/avajs/ava/issues/1418
Test Source
- https://github.com/pixelass/ava-xo-test
- https://github.com/pixelass/ava-xo-test/blob/3f9f228f279804d8634a367f5458f69ffbc7d253/one/a/b/c/d/e/f/g/h/i/j/this-is-it
Error Message & Stack Trace
nothing happens
Config
{
"xo": {
"ignores": [
"node_modules/*"
],
"rules": {
"import/no-unassigned-import": 0
}
}
}
Command-Line Arguments
{
"scripts": {
"xo": "xo --quiet './**/*.js'"
},
}
xo --quiet './**/*.js
Relevant Links
Minimal reproduction:
https://github.com/pixelass/ava-xo-test/
Environment
OS X 10.12.5 (16F73)
Node 6.11.0
Requested log:
Platform: darwin 16.6.0
xo: 0.18.2
node: 6.11.0
npm: 3.10.10
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 28 (14 by maintainers)
Commits related to this issue
- Define missing boolean CLI arguments Discovered in #234 — committed to xojs/xo by sindresorhus 7 years ago
- Define missing boolean CLI arguments Discovered in #234 — committed to xojs/xo by sindresorhus 7 years ago
- Define missing boolean CLI arguments Discovered in #234 — committed to xojs/xo by sindresorhus 7 years ago
I discovered the main culprit. We didn’t define
quietas a boolean, which made the glob pattern an argument to--quietand not an actuall pattern, which resulted in XO using its default pattern, which is**/*.Try changing it to:
Please close issue
@pixelass @SamVerschueren @OmgImAlexis @niftylettuce we released a new version of XO with improved performances regarding globbing. That would be great to have your feedback, as you experienced performance issues on your projects before. Is the new version improve the situation? Do you still experience unreasonable slowness?
@OmgImAlexis a lot has been done to improve performances since you opened #212, including changes in
globby.@niftylettuce, @OmgImAlexis any comments need to include:
Every comments with vague things like "incredibly poor performance” or “multiple different projects in multiple configs” or references to 2 years old things are not helpful and doesn’t allow us to analyze anything.
After deleting the cache:
Eslint: 14s XO: 59s