-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Huge memory usage regression: 580 MB in 0.43 → 6300 MB in 0.44 #599
Comments
@fisker any chance you could have a look at this please? The slowness is quite noticeable. Thanks! |
I'm sorry for the regression. Before, we search config files before lint, this cause problem here, it is also very slow when I want lint a single file, xo look for all config files(include Now we search config file one by one when actually linting. This solves the problem I described above. But I guess this is also the reason causes huge memory usage. I'm not sure what to do. |
Maybe queue the lint jobs can solve it? |
I'm not familiar with the codebase to be able to help. Maybe @sindresorhus has a suggestion. |
This comment has been minimized.
This comment has been minimized.
@devinrhode2 Not sure why you think that. There are no relevant commits between 0.44.0 and 0.45.0, and the problem still reproduces with the reproduction instructions from my original report. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Note that, like I alluded to in the report, But, if you account for that (and don’t forget to delete |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Latest |
I tried limiting the concurrency and it didn't seem to help: 4f05195 So the issue might be somewhere else. |
I also tried upgrading to ESLint 8, which also didn't help. |
@fisker Using the dev tools memory inspector might reveal where the memory leak is. |
I took a quick snapshot in Chrome and it seems like most of the memory is spent on TypeScript. My guess is that since we're now creating a new instance of |
We use GitHub Actions and after upgrading to For now we've downgraded and are sticking with Thought I'd mention it in case others are quietly hitting the same issue. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@devinrhode2 If you take a look at my original test case, you’ll see that it’s using TypeScript 4.3.5. You’ll also see that I already did the work of bisecting the problem to a specific xo commit. It was not introduced by a TypeScript upgrade or your other suggestions. If you are seeing a problem related to those things, I suggest filing a separate issue with a detailed test case. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@devinrhode2 I’m glad you’re enthusiastic about finding generic ways to improve XO’s memory usage. However, my concern is that you’re making this report harder to follow by presenting generic ideas that aren’t related to the specific regression introduced by a specific XO commit that I reported here. Would you be willing to move your ideas to a new issue? Thanks. |
Using Node.js 14.17.5 with NPM 6.14.14 for this reproduction recipe (
npx
works slightly differently in NPM 7).I bisected this memory usage regression to e2e715d “Simplify
lintFiles
(#583)”. Cc @fisker.The text was updated successfully, but these errors were encountered: