-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too slow on large projects #234
Comments
Just chiming in - XO already ignores |
@Qix- thx. I'm not sure why we have it listed. Probably c&p from other plugins. I was aware that it is ignored though. I created the test-repo similar to our setup. |
I switched to eslint using the XO shared config. It takes about 7 seconds to lint all files and the config can be read by the variety of editors our developers use. So the issue is not related to eslint itself. Hope this helps. |
Is it also slow when running it through the command line? There's an issue with the XO linter in VS Code on large projects. So my question, is this really a XO issue or rather a plugin issue? |
I first experienced this issue from the command line. All issues around editors came from developers in my team. I'm just making sure everybody is happy. |
I discovered the main culprit. We didn't define Try changing it to: - "xo": "xo --quiet './**/*.js'",
+ "xo": "xo './**/*.js' --quiet", |
It still takes 18 seconds just to glob the 25891 The |
I just added eslint with the xo shared config as a comparison. For me xo is still very slow in that test project (>40 sec) while eslint works as expected (~12 sec) which isn't fast either but acceptable. The changes can be viewed on the master branch |
This example is taken from a java/hybris project with multiple brands. The frontend is not separated from the backend. I tried to make it as similar as possible. Only a few files should be globbed now since I forgot the folder name |
Try deleting |
As I thought, inefficient gitignore handling. This line takes more than 6 seconds. |
XO will always be slower than ESLint + |
After deleting the cache: Eslint: 14s |
To sum this up there is a bundle of performance related issues we could tackle to improve user experience:
I do not have a coherent idea on how to tackle points 2 and 3 without reimplementing the gitignore logic of |
Why would we have to reimplement the gitignore logic? |
Taking @schnittstabil 's comment about
I only thought about scenario 2 in my previous comment. |
Any update here? I still find xo to be incredibly slow while linting 1000-2000 LOC and eslint is fast. |
xo albeit nice has greatly hindered my development speed, I'd gladly pay a bug bounty 🐛 💰 |
@niftylettuce looks like sindresorhus/globby#68 has fixed or at least helped with this. |
@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. |
Still incredibly poor performance, even on a file only 600 LOC |
What “incredibly poor performance” means? Please provide numbers. |
Also, keep in mind Node has a bootup time of about 600ms at the least, which is astronomically high especially if you're running it over and over in a loop. There's nothing the XO team can do about that either. |
@Qix- eslint with the same config runs in a LOT less time. It's not node that's the issue. It's very likely still something like @pvdlg have a look at the other issues @niftylettuce and I have commented on regarding speed issues with xo; We've both had issues on multiple different projects in multiple configs. If we could reduce it to a single issue we'd all be happy. 😞 Ref: #212 |
@OmgImAlexis a lot has been done to improve performances since you opened #212, including changes in @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. |
I have provided a reproducible test case #212 (comment). The issue is when you have a lot of conditionals, the process for |
1 second. Make sure your lockfiles are blown away - they cause lots of issues such as outdated modules. EDIT Just saw #212 (comment) - glad that was the case :) |
Please close issue |
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: sindresorhus/globby#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. avajs/ava#1418
Test Source
Error Message & Stack Trace
nothing happens
Config
https://github.com/pixelass/ava-xo-test/blob/3f9f228f279804d8634a367f5458f69ffbc7d253/package.json#L35-L41
Command-Line Arguments
https://github.com/pixelass/ava-xo-test/blob/3f9f228f279804d8634a367f5458f69ffbc7d253/package.json#L10
Relevant Links
Minimal reproduction:
https://github.com/pixelass/ava-xo-test/
Environment
Requested log:
The text was updated successfully, but these errors were encountered: