-
Notifications
You must be signed in to change notification settings - Fork 341
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
Slowdown on code assist with eslint enabled #215
Comments
@benduran are you able to share your project. ESLint runs in a complete separate process than the JS code assist. I would like to understand why/how ESLint affects the JS code assist. Do you have high CPU load ? |
@dbaeumer I may be able to share the specific file in question, but not the whole project, as it is a work-related project and contains sensitive information and features we cannot share with the public at the moment. I will try running a CPU profiler on VSCode while running my project and report back later this afternoon / early evening. |
I'm experiencing the same issue. I enabled the ESLint extension (dbaeumer.vscode-eslint) a few weeks ago and set The lag becomes so noticeable that characters appear a solid second or two after I type them. After a while of increasing lag, the The output window from ESLint only shows the following. I'll turn on verbose messages to see if anything stands out over the next few days.
So far this issue hasn't been restricted to one particular project for me either. I've noticed it while working on React, Ember and Node apps of various sizes. Happy to help further if you need other specific details. |
@mwadden Thanks for chiming. I've been so busy at work that I haven't had time to run my CPU profile. I found that by switching to this: |
@benduran I have an idea what could cause this since it becomes more responsice for onSave. Will look into this beginning of April. |
@dbaeumer Thanks for checking into this. I'm glad I have a temporary work around for this issue, but I look forward to hearing more about a possible fix 👍 |
@dlong500 @benduran I worked on a new version of the ESLint extension that uses a more sophisticated validation queue. It will allow for even tweak the timeouts if necessary. Since the change is bigger and it might not even fix the problems you are seeing I would like to ask you to beta test the version. To do so following these steps:
IMPORTANT: since you installed the extension using an explicit command the extension will not be auto updated from the store anymore. When I push 1.2.9 (which I will let you know in this issue) then you need to uninstall the ESLint extension and reinstall from the store. Sorry for this inconvenience. |
Thanks. I'll test it out over the next few days and let you know how it goes. |
I've installed it tonight. Will test it thoroughly between now and end of
the week. Will report back with my findings
…On Tue, Apr 4, 2017 at 12:43 PM, Davison Long ***@***.***> wrote:
Thanks. I'll test it out over the next few days and let you know how it
goes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#215 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGGJn917D7BJPcUJJn82x33Qv3Hy220yks5rsp1rgaJpZM4McF6q>
.
--
- Benjamin
|
@dbaeumer I've been using the eslint build you prepped. I can confirm that it no longer affects intellisense while coding. Code assist is snappy like it was previously. However, some of my files do cause noticeable performance issues with the linting messages I receive in the eslint console in VS Code. The linter does eventually catch up, however, it is a bit sluggish. There are two files in question that cause this slowdown, but they're relatively small (one is less than 700 lines, the other is less than 300 lines). |
I've been having a similar issue with eslint in vs code -- sometimes it takes a very long time to catch up with linting a file that is being edited. Right now I am working on refactoring a ~2000 line file, so it is particularly noticeable, but it used to not be a problem 😕 The messages trace looks somewhat like this:
Often, when it starts lagging behind, the delays just keep getting larger and larger (while at 100% CPU) until I stop editing, at which point after several seconds the delays start getting shorter until it is done. I have tried the build linked by @dbaeumer but the performance problem did not change. |
@Kovensky thanks a lot for the trace. Would you be able to include the whole trace. To really understand what is going on I need to see the change notifications send from the client as well. They show up as @benduran could you produce such a trace as well. To do so enable the setting One thing that the trace shows is that there are two many Is any of you able to share the project with steps how I could reproduce the slow down. Will help better understanding what is going on. |
I disabled and re-enabled eslint using ⌘+Shift+P, waited until the output stopped, cleared the output, and then wrote
You can see the increasing delays towards the end. |
I haven't yet tried the new version you posted a few days ago but I wanted to share this trace from a few mins ago. I'm currently working on a file that's 472 lines long. I'm going to try your latest version now and I'll report back once I get a sense of if it's helping or not.
|
@Kovensky @mwadden thanks a lot for the traces. I know better understand what is going on. I will look into a new version of the extension for you. From my first analysis this will requires some changes in the VS Code core as well since we are triggering far too many |
We fixed parts of this in master which is already in insider (thanks to @jrieken). However there is more work to do which has to happen in the ESLint extension. The problem is that codeAction requests should only be sent if the diagnostic the code action is requested for contains a ESLint generated error. Otherwise ESLint is not able to provide any code action. |
@Kovensky @mwadden @benduran @dlong500 Attached a new version of the eslint extension. Please follow the steps in #215 (comment) to install. The extension requires features from the insider build to work optimal. It is working with stable as well but it will not profit so much. Please let me know if this improves your experience (note that I am out on vacation next week so it will take a little for me to respond). |
Running
EDIT: removing the previous extension before trying to install again worked. |
@Kovensky sorry for that. Since I didn't official publish I didn't increment the version number. |
Wanted to mention that the latest version you've provided has improved the performance again, but there is still some "catching-up" that eslint is doing when my settings are set to run |
@benduran thanks. Would you be able to share your workspace. Would ease tracking this down further. |
Quick update... I've been using the version from Apr 4th for a few weeks now and it's been great. No noticeable concerns. I just installed the latest version from Apr 13th now so I'll give a few days and report back. Thx again for the quick turnaround on fixing this, it's made vscode usable again! |
Following up from my last comment, it's been a few days now of heavy usage and everything seems great still. |
Great to hear. |
I have everything up to date, including the ESLint plugin with latest version and this is still happening. |
@ItsNoHax can you please open a new issue with steps to reproduce (best would be a clonable GitHub repository). |
Not sure I can, this is happening at my work's React-Native project which has a substantial size code base which could be related to why it's sluggish. |
@ItsNoHax something like this is hard to track down without a test case :-( |
Just recently, I've been experiencing some issues with medium-sized javascript files with Redux.js action creation and dispatching-type code. I've tried installing the nightly build version of VSCode to see if it may have been something related to the latest stable version of VSCode. I've disabled a number of extensions, as well as the github integration. These had a marginal impact on performance. Disabling ESlint for my workspace, however, seemed to resolve the performance issue.
The text was updated successfully, but these errors were encountered: