Skip to content
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

Pylance informs me that enumerating my directory is taking a long time multiple times per minute #6270

Open
cjdb opened this issue Aug 15, 2024 · 3 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@cjdb
Copy link

cjdb commented Aug 15, 2024

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

Screenshot 2024-08-15 at 13 18 38

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?

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 15, 2024
@heejaechang
Copy link
Contributor

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.

@cjdb
Copy link
Author

cjdb commented Sep 1, 2024

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.

@heejaechang
Copy link
Contributor

heejaechang commented Sep 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants