-
Notifications
You must be signed in to change notification settings - Fork 342
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
ESLint extension making VSCode IntelliSense and linting very slow #1568
Comments
@tiago-eusebio-pbss Do you have any specific extension settings? If so, take a look at #1538 (comment) for possible optimizations. It's really hard to isolate what exactly is causing the performance problem, but from looking at your config, I wouldn't think that it's entirely due to this extension. Angular + typed linting can get quite heavy (the plugin even acknowledges this in their repo). I can understand your frustration though: These tools should ease and improve our development process, not clutter it. Maybe once #1542 is implemented you'll obtain a better perf diagnosis. |
@MariaSolOs Thank you for answering. The VSCode preferences related to the editor are the following: (...)
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.trimAutoWhitespace": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"typescript.preferences.importModuleSpecifier": "relative",
(...) Maybe we can add the following preference, but not having it was not an issue previously: "eslint.codeActionsOnSave.mode": "problems" I can confirm that the performance problem is related to the extension, as we no longer have this issue if we uninstall it. Furthermore, going back to VSCode v1.73.1 with the exact same extension and settings, the issue does not occur. That being said, I assume that something on the new VSCode version (v1.74.x) introduced a conflict with the extension. Thank you |
@tiago-eusebio-pbss could you share a GitHub repository that we can clone that demos what you are seeing. Performance problems like this depend on so many varaibles (version, plugins, ....). In addition two things are strange:
Disabling an extension results in not loading it's code at all in VS Code.
The ESLint extension doesn't provide any IntelliSense information and hence has no influence on the performance of that operation in VS Code. Both points indicate that the actual problem might lay somewhere else. So steps to reproduce would help a lot to understand what is going on. |
After some more hours debugging you were right. The problem is not related with the ESLint extension but one of our proprietary dependencies. Strangely it only occurs with the new VSCode version, but thats a story for another place :) |
Which dependecy would that be, because I'm hitting a major performance hit since VSCode got upgraded few versions ago. I didn't give it much attention then. because I thought it will be resolved with some newer version, but it became really annoying that my Intellisense is a hit & miss. Sometimes it works, sometimes it just doesn't... |
It is an internal dependency created by our team. The way we solved it was to put a config on VSCode (.vscode/settings.json) pointing to the workspace's own TS lib: |
Ahhhh I wish I had found this months ago. I don't know why this works or why the ESLint VSCode extension takes minutes (minutes!) to fix a single file without it, but seemingly had nothing to do with my rules or other extensions. It was just setting |
This is the real solution. My linting is instantaneous now. I use a mac and I don't use a workspace. The setting that I use is |
Another completely different use case that causes the Eslint plugin to slow down dramatically (up to 30s on M2 Max): the combined Vue construct: readonly(reactive(...)))
|
@nelisbijl can you share a repository the demos that. How does validation perform in the terminal on that file? |
Everything you need is in this single file
|
Things like this mostly depend on the version of ESLint, its plugin, .... So a setup I can clone is highly appreciated. |
Turns out Eslint CLI is slow as well: |
Thanks for the repository. If the CLI is slow as well the only thing you can do is to tweak the rules that get executed during linting or code action on save. For code action on save you can even override the rules using VS Code settings (
|
On the latest VSCode 1.74.0 and 1.74.1 the ESLint extension makes the IntelliSense and linting to be very slow.
After uninstalling the extension everything becomes fast again.
Disabling the extension maintains the issue.
On VSCode 1.73.1 the issue does not occur.
VSCode Version: 1.74.1
ESLint extension version: v2.2.6 and v.2.3.0 (pre-release)
eslintrc.json file:
.eslintignore file:
The text was updated successfully, but these errors were encountered: