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
Significant lag and performance degradation in VSCode with Volar on #1615
Comments
I can confirm this on my system as well. It's quite ridiculous waiting for insights take +5-10s and makes it impossible to get insights with any sort of speed. |
|
Okay, I'll try to change these settings to test when I get back to work next week; I suspect the lag may be related to some of the |
If I had to pinpoint a release it would probably be the last 3, notably the worst being Doing what you suggested plus the update you released yesterday and today seemed to have make it a bit quicker as well. As for my TS version I am running |
So it seems when importing items it goes by each char rather than waiting for a word or something to appear. There's no delay. This could def cause issues with the performance. |
@brys0 Maybe you're looking for |
Please let me know if this version can alleviate the problem or not: volar-0.39.2-alpha.1.vsix.zip |
There appears to be no difference. Apologies for the wait. |
It's too slow to use |
I've removed every extension did a fresh install of vscode and just installed Volar and it's still just as slow. I have no idea what might be happening, based on what you said it could be related to certain node modules? Such as |
Yes. For debugging it used around 1.5gb of memory for the project (Is that alot?). Below is a zip of the entire cpu profile as well as a screenshot |
It depends on tsconfig count and node_modules size, if Please try volar-0.39.2-alpha.2.vsix.zip, which try to cache statSync(fileExists, directoryExists) result. |
@johnsoncodehk I just tried this version, which is much better than before, but there is still a little delay. Thank you for doing this. |
delete lang="ts" and prompt quickly |
Version 0.39.2 is a little faster after setting lang="ts", but it can't do the same second prompt as if lang="ts" is not set |
This comment was marked as abuse.
This comment was marked as abuse.
Okay, this looks like your first issue, how about to take a look at what others are doing? |
@brys0 Please let me know if this version have difference or not: volar-0.39.5-alpha.1.vsix.zip |
I found that latest VSCode built-in TS v4.7.3 has performance issue with |
I figured it may have been an issue with typescript trying to work with 2 different versions. Lovely you found the issue, thanks for taking your personal time to fix it. Much love 🤍 |
I can also confirm this. It suddenly got slow. I uninstalled VsCode and it's settings, cleaned cached, did general cleaning but still slow.
Tried this one but it is the same. Thanks for your time though. Hope this gets solved. For now I downgraded to |
@onurusluca Thank for the information, is this problem begin in v0.38.6? v0.38.5 ~ v0.38.6 only have one commit and it should be unrelated, so I'm out of ideas for now. I still can't reproduce this performance issue, I may need someone try with each commit after v0.38.5 and let me know which commit cause the problem. |
@johnsoncodehk Thanks a lot for the reply. Sorry for not specifying the problem. I chose v0.38.5 because the next update from that has a longer gap. I am testing all the versions now. It is taking a bit of a time. I will write here as soon as I am done testing. Also great job with the extension. I love Volar! |
@johnsoncodehk Got it! The problem starts from Previous versions take 1 second or less to highlight a syntax problem but v0.39.2 and later takes 3 seconds or more. I am more than happy to provide any details you need, just ask. For now I am providing the default details: VsCode: June 2022 (version 1.69) Operating System: System: |
@onurusluca Thanks to confirm this, v0.39.2 is later than this issue, it should be a different problem, could you open a new issue for this? |
@johnsoncodehk Hey. |
Created a new issue on this: #1663 |
@onurusluca Sorry just typo, I mean v0.39.2 released later than this issue open. |
same problem.
|
Since a while, I am also having memory issues and finally I am quite sure it is coming from volar. Only difference is, I am not running volar in VS Code but in Neovim. Maybe that helps pinpoint it down. Neovim and volar are running in two separate processes, but still the nvim process is hogging more and more memory In this example it took 6.8GB of RAM. It can't be Neovim itself, because opening and using a Rust project for longer with its lsp, the memory stays constant and low, same with a pure js/ts project with eslint-lsp. For me it is no instant lag or problem. The memory keeps growing and growing during the usage. Also, when I pause for a long time neither stop the application, the memory doesn't go down or increase but stays at one level. If I continue using it, the memory usage continues to go up. Seems like a memory leak to me? Why the memory accumulates in the nvim process could be that the Neovim LSP is caching too much stuff from the volar lsp, as suggested by @mehalter in AstroNvim/AstroNvim#797. Hope this is helpful! |
For me it is resolves somehow. I just worked for a few hours on a vue project and no performance decrease, neither high memory usage. |
Had the same issue. I confirm that, disabling TS: 4.8.2 |
Please open a new issue for memory usage. I have no reproduction that reproduces the problem so can't check it, I'd appreciate if someone provide a reproduction. I made some performance optimizations in v0.40.2, please try the new version works for you or not. |
I am using the latest version 0.40.4,but it also slowly and cost lots of memory |
For peoples who still has performance issue with latest version, you can try:
Close this issue because do not have anymore helpful information, if you can confirm the performance from plugin, please open a new issue with append repro case or profiling record. |
Removing
from my global settings, did the trick. Hope it helps. |
It is disappointing that this issue was closed as, being the only development tooling for VSCode, the continued performance issues of Volar effectively make VSCode + Vue an incompatible pairing. (The setting fixes recommended above also do not exist on recent versions of Volar.) |
The current version of Volar does not have much overhead, but its performance is limited by TypeScript. If your project itself is a huge TypeScript project, TypeScript LanguageService will analyze it slowly anyway. If you can provide a repro case, I might be able to help find out the performance hotspots in your project. It may come from a certain dependency, or some recursive type. At least the performance problems I have checked recently are all from the project itself. If you need help please provide a repro case and open a new issue, I'll find time to check it, otherwise I can't help, I'm not a magician. |
WebStorm now also uses Volar and it takes almost 9 seconds for the error to disappear. error_delay.mp4What helps is switching Volar with the TypeScript Service. |
You may open a new issue, and then provide some logs. Commenting here won't solve this issue... |
I had a similar issue: very slow snippet suggestions. Setting |
Issue Type: Bug
This issue is a recent one, perhaps related to the recent update?
Extension version: 0.38.9
VS Code version: Code 1.69.1 (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a, 2022-07-12T08:22:10.822Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: