pylance-release
pylance-release copied to clipboard
Pylance informs me that enumerating my directory is taking a long time multiple times per minute
Environment data
- Pylance version: v2024.8.1
- OS and version:
- Host: macOS
- SSH: Debian, custom build
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.9
Code Snippet
Not applicable
Repro Steps
$ git clone https://github.com/llvm/llvm-project.git
$ code llvm-project
Expected behavior
This message pops up at most once per instance (or better yet, never after the first dismissal).
Actual behavior
This message appears whenever a new file is added, or an existing file is edited. When building LLVM, this will happen very frequently.
Logs
The amount of logging that happened seems to have deleted the what was at the top of the output, and it seems to be 11190 lines resembling the following:
2024-08-15 20:32:30.289 [info] [Info - 8:32:30 PM] (1431880) SourceFile: Received fs event 'add' for path '/home/cjdb/projects/llvm-project/build/tools/libclc/obj.libclc.dir/cypress-r600--/amdgpu/lib/math/half_recip.cl.bc'
2024-08-15 20:32:30.309 [info] [Info - 8:32:30 PM] (1431880) SourceFile: Received fs event 'change' for path '/home/cjdb/projects/llvm-project/build/.ninja_deps'
Will supplying that much text be helpful?
we can make it show only once but pylance won't work properly if it keeps happening? is that okay? probably better way is see the learn more and actually configure pylance correctly for your repo so the warning doesn't show up?
the warning is basically saying our default heuristic doesn't work for your repo and you need to manually set it up so pylance can behave properly.
I had no idea that pylance was even installed until this message started showing up. I'm fine with a suppressed message, since having it show potentially hundreds of times per minute is extremely distracting.
if that's what's happening, pylance probably wasn't doing anything for you, it just chewing CPU re-initializing in background again and again.
I think this is probably better for you - https://github.com/microsoft/pylance-release/wiki/Pylance-Configuration-Tips
just copy and paste the whole pylance setup example in settings.json and the warning will go away.