-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
VSCode slow with extension enabled #22160
Comments
I opened dev tools in VSCode, and it had a warning Is there any other information I can provide to help debug the problem? For reference, the repository that serves as my open folder is roughly the |
Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience! |
Is there any guidance you can provide on how I can debug this issue myself? Is there a debug mode in the extension I can enable to figure out where exactly the slowdown is occurring? |
Logs could also provide some guidance regarding what is being run. Output for
|
I think I've figured out the solution in my case: I flipped the following two flags to false in my
For reference, the repository I am working on (https://github.com/getsentry/sentry) has ~5400 Python files, and ~23000 tests visible to pytest. I think either the re-indexing of that many tests, or perhaps that feature's interaction with some experimental feature, is what is causing the slowdown. |
Great, reassigning to testing. |
Hello! We have tried our best to make our test discovery performant but every save a this point does re-run discovery. Can you try still having the experiment on and just turning off the auto-test discovery and let me know if that helps? Our new testing experiment should be faster than our old architecture so I would love to hear if you are not seeing that on your end. Thanks |
Toggling the |
Thank you for trying it both ways with the experiment. When you run the same command from the command line (are you using pytest or unittest?) how long does it take to return? You can find the command in your logs but try and specify Secondly, you say the editor gets sluggish, does it freeze or does it just work slower? And this happens after you invoke refresh tests and before you see any changes to the UI? Thank you for your help! |
Pytest only.
It varies quite a bit, but the little "clock" appears on the test indicator in the left panel for anywhere from 10 seconds to 2 minutes in the worst case.
Can you give more detailed instructions on how to accomplish this? Where do I pass the --collect-pnly flag? How do I view this data? etc. |
First in the command palette set your |
@connor4312, any thoughts on sluggish editor when test discovery is being run for a large workspace? Do you think there is anything on the core side that could help reduce editor lag in this case? |
I think the UI slowness is probably the same as microsoft/vscode#193240 under the hood, so I'll fix that. As a former self-hoster of Sentry, I feel obligated to 😉 It looks like the extension is also loaded fairly heavy as indicated by #22160 (comment). It would probably be worth looking into that on the extension side as well to see if there's anything to optimize. |
I had some time so I made a PR that reduces blocking time in the extension host from 17s -> 950ms when loading the 75k tests from the lsprotocol repo: #22414 |
fyi to those in the thread we will be delaying this PR for about a month as we make other design changes, thanks |
Type: Bug
I used the Extension bisect feature to figure out what was slowing down my system when working on a Python codebase, and it's the root Python extension, not isort or pylance as I previously suspected. Everything is much slower with the extension enabled: git operations (revert, compare changes), reference lookups, even saving files sometimes takes several seconds.
Extension version: 2023.16.0
VS Code version: Code 1.82.2 (Universal) (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:59:47.790Z)
OS version: Darwin arm64 22.6.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
The text was updated successfully, but these errors were encountered: