Extension freezes when using Pylint and WSL
See original GitHub issueNote: A previous issue I made regarding this issue here was closed, and aeschli requested that I re-posted it here.
Since posting the original issue, I’ve disabled pylint and similar options which solves the freezing. I’ve recently enabled the PyLance extension to gain back the ability to follow references in large files using CTRL + CLICK and some basic syntax checking/auto importing. This seems to run fine, but enabling the default pylint functions results in freezing again. I’ve also since upgraded VSCode a few times and I’m currently running the latest version:
[Window Title]
Visual Studio Code
[Main Instruction]
Visual Studio Code
[Content]
Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z (2 days ago)
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
[OK] [Copy]
I’ve since also upgraded to use Python 3.8 instead of Python 2.7, not sure if that matters but that might narrow down the search.
Original issue information:
Hard to reproduce, some days it freezes after a few seconds, sometimes after a few minutes, and sometimes it never freezes.
When i say freeze, I mean I can still edit, but I can’t use the debugger (start/stop/jump in code), use git (extensions), type in the terminal/console window. Saving a file, depending on the size, takes a very long time (>5/10 seconds). Search in workspace/folders/files completely stops working, search in current/opened file(s) still works.
Rebooting PC does not help usually. It’s very, very random and sometimes it can last an entire day (even with pc/vscode restarts), other times it can be gone after a few freezes, or sometimes it never happens.
Extension version: 0.42.4 VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:38:38.248Z) OS version: Windows_NT x64 10.0.19041 Remote OS version: Linux x64 4.4.0-19041-Microsoft
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-8700K CPU @ 3.70GHz (12 x 3696) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 31.93GB (19.06GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Item | Value |
---|---|
Remote | WSL: Ubuntu |
OS | Linux x64 4.4.0-19041-Microsoft |
CPUs | Intel® Core™ i7-8700K CPU @ 3.70GHz (12 x 3701) |
Memory (System) | 31.93GB (19.06GB free) |
VM | 0% |
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Yes that’s great! I didn’t notice that Pylance was a Microsoft extension, and I found the extension description a bit confusing. But then I googled it and found the blog post saying it’s going to replace the default Python extension. Good news!
Oh sorry, yes that’s what I’m doing. It works nicely, I’m very impressed with that extension.
I have found the default Python helper experience in VS Code quite laggy and non-functional as well, and the scripts I’m working with are much shorter than 10k lines. It happens for me for scripts of all sizes, even only 100 lines or so.
I am up to date with the main VS Code releases, running Remote Development on a local WSL2 distro. But the Python lag has been happening basically since I started using VS Code last year, with lots of different scripts, modules and environments.
So I suggest bearing in mind that this issue may affect many VS Code users who code in Python. It doesn’t slow down actual editing operations, it just makes many nice VS Code features appear broken, like Ctrl-Click to go to definition, or auto-completing function names, or quick lookup of function parameters.
Switching to Pylance has made the experience much snappier, so it is now similar to the default VS Code JavaScript experience. Thanks @TomGrobbe for that recommendation!