-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Discussion: Is it me or Visual Studio Code performance degrades over time in the span of a few hours? #50279
Comments
Electron...probably leaking memory like a sieve. |
On Windows 10, I've noticed the same slowdown with no noticeable memory leak (Code stabilized at around 1.5GB RAM). I haven't really measured how much time it takes, but it's around long enough to forget when I started. It also doesn't help that it becomes gradually more sluggish over time so it's hard to pinpoint the exact time when it happens. Symptoms are exactly as in the original post. I've experienced this on Windows 10 on two separate machines, one a dual-core i7 with 12GB RAM and another a quad-core i7 7700HQ with 16GB RAM. Both with TypeScript and plain JavaScript with jsconfig. On the first machine, I also tried Linux for a while (Ubuntu), and I did not experience slowdowns of any kind. |
@tommai78101 Can you use the "Help - Report Issue" feature of VS Code to let us know what your system information, and more specifically, your installed extensions are? Thanks! |
I noticed if I open project for a long time sometimes autocomplete disappears and I need to reload window to get autocomplete back. Overall it looks good. Also, I believe after updating Electron to 2 version performance will be increased since it will get newer Node.js and Chrome version as well as other benefits. |
@tomzx Sure System Specs
Extensions List
|
Both @tommai78101 and @shawmanz32na (#50280) appear to report memory leaks recently. They also share 1 extension in common: It might be possible a regression has been introduced in those recent versions, which could explain why both of you experience the same issue in the last few days. Would you both say that you've started noticing this issue in the last few days or has been a while (more than a week)? @foxbunny & @svipben, can you also provide the information @tommai78101 shared above? |
VS Code version: Code 1.23.1 (d0182c3, 2018-05-10T17:11:17.614Z) System Info
Extensions (9)
|
@svipben Not sure if that's related to this issue, but yes, I also experience that. Sometimes it does not even take very long (like within a few minutes of reloading the window or restarting VS Code). |
For me, this issues has been going on since several releases ago, including the times when I was not using vscode-eslint (on a TypeScript project using TSLint instead). I believe the last release that I did not experience major slowdowns with was 1.19.x, but I can't say for sure. |
I use vscode all day every day (at work) doing mainly C++ dev (Windows and Ubuntu), but haven't noticed any slowdowns. The only one I am aware of is one of my own extensions which does a lot of entire file formatting (outside the native formatting functionality). |
I've switched to F# for a few hours, and I can confirm that there is no slow-down. Slow-down only happens with JS/TS code. |
I can't say if the issue started after the update to 1.23.1, which was at least 1 week ago, maybe even 2 weeks ago, because I started using VS Code exactly 4 days before 1.23.1 was out. I can at least say I just started using VS Code, and the issue was persistent throughout the time I am using VS Code after 1.23.1 to this day. I've been going back and forth, questioning myself, and feeling in doubt if it was because of me working with a memory-hogging browser (since I always have constant 14GB hogged up with my 16GB rig), or if it's an actual VSCode + ESLint issue. I was pretty hesitant to report anything, until now. @Gruntfuggly Do you have ESLint or JSHint installed on both Windows and Ubuntu dev environments? |
@tommai78101 |
IMHO, this issue belongs to a discussion forum and not in an issue tracker. As it stands, the issue is not actionable, i.e. I cannot really do any code change and close the issue as fixed. To improve this, I have added follow-up steps to each thing you bring up in order to try to transform this issue into something actionable.
All in all, I appreciate the issue and thanks for writing all this down, but in order for things to improve, we need to have something actionable that can potentially lead to a code change that improves things. How to create a CPU profile of the renderer processTo get a CPU profile of the renderer process:
|
@svipben @alexandrudima Thanks. I guess I can post here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsarch I think that link above should be in the README.md, considering that it's an actual Discussion Forum. I will do all of the tests and will post the results tomorrow, since:
Yeah, that's all. UPDATE: Wait a minute, that MSDN Forums link is for Visual Studio Code Visualization, not Visual Studio Code. @alexandrudima Am I allowed to request for an official MSDN Forums dedicated to Visual Studio Code, since it's under the Visual Studio umbrella? |
@alexandrudima Today I've worked for 4 hours with eslint disabled. It seems that with the current VS Code build, there is no slow-down when eslint is disabled. |
There was an
It is better. There was hardly any slowdowns and VS Code runs smoothly when the text cursor is traversing through words and characters while holding down Left and Right arrow keys. Anyway, here's the CPU profile:
CPU profile.zip. (Moving text cursor up and down during a slowdown phase.)
I'm not sure what "grammar" refers to here in this context, I think it's TextMate TypeScript tokenize2() or something. The theme I'm using is @alexandrudima Is the information provided good enough? Let me know if you need more. |
@tommai78101 That is a horrible lag! Looking at your latest profile, I can see on the UI process that there is an extension which creates a lot of editor text decorations. It is difficult for me to guess how many those would be, but most likely in the thousands. Only here the UI stalls almost 400ms to dispose text editor decoration types: I wonder what precise extensions you are using when the slowdown occurs. You can find the most precise list by running TL;DR: I believe you have an extension running that uses the text editor decorations API with possibly thousands of such decorations or in a way that causes significant slowdown. Alternatively, the extension could possibly be leaking text editor decoration types.... Leaking would explain why the slowdown takes hours to accumulate. |
I think this may be it. Relative to other extensions, the extension CPU-20180529T174916.178Z.cpuprofile.txt.zip I'll be reporting this over to the It's great to have this discussion, as I learned how to profile extensions from all of this. Thanks for your time. |
👍 Thank you for following through with this! We are not yet at a point where we can trace back automatically slowness in the UI process to the exact extension that made the API call, simply because things are a bit complicated when dealing with these two processes, but that would be something great to implement one day! |
Version: Visual Studio Code Stable v1.23.1
OS: Windows 7 Enterprise LTS
This is a discussion. I cannot ask this on Stack Overflow, and there really isn't any community forums I can participate in that has an active developer-oriented userbase with 100% guaranteed Visual Studio Code users. All other communities are not 100% guaranteed.
This is mainly targeted at Visual Studio Code users who kept the application running for more than a few hours.
I would like to ask if anyone has experienced performance degrading / slowdowns when using Visual Studio Code for long periods of time, in a span of a few hours ranging from 2 hours to 5 hours?
Slowdowns include:
Left
orRight Arrow
keys, the text cursor jumps a couple of characters, instead of traversing through each character/letter in a word or a line of code.Page Up
orPage Down
keys, there are times when code syntax highlighting would color all of the visible codes as 1 solid color, and it takes a while for the application to syntax-colorize the codes properly.Save
operation occurs.Let me know if what I'm experiencing is actually happening with Visual Studio Code, or it's because I'm running on a workstation and it's something else on my workstation that's memory hogging up resources for Visual Studio Code.
I just wanted to see more anecdotes than myself.
Thanks for reading.
The text was updated successfully, but these errors were encountered: