-
Notifications
You must be signed in to change notification settings - Fork 767
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
searching for source files taking many seconds #1282
Comments
Somewhat similar to #1281; can you see if there are any directories in your workspace that need to be excluded? See that thread for a config. I'm curious what paths we are including that we shouldn't be, and if there's something we've missed. |
Awesome this worked great thanks! Filtering out directories with Not clear to me why including it continuously leads to: |
Hmm,
Logs are always helpful. |
Ohh it seems I mispoke: Including everything but the i.e. {
"include": [
// every file and folder except .git
// ...
],
} This doesn't work: {
"exclude": [
".git"
]
} Logs without
Logs with
It appears something in vscode is touching my |
Going to reopen this; I think we need to verify that our file watching filter is actually ignoring I also misspoke; |
".git" is not a folder or a python file, so adding it to "exclude" should have no effect. |
turning on pyright's verboseOuput might shed some light on which files are being touched.
|
Yup that's helpful, this is when I include
|
Yeah, seems like there's some tool that is plopping something in I will send a fix for the next release. |
Thanks everyone! |
Out of curiosity, what was the file extension for that watchman file? I think we should end up ignoring non-.py/.pyi events, but it may be the case that we mis-treat this event as a folder change. |
There is no extension on the watchman file. |
Thanks. The logic here is due for a re-look, but file watching is temperamental and hard to screw with without breaking someone. |
It seems like there isn't a way to easily exclude it in the
^ This still leads to:
|
Maybe I'll just try this in the near-term:
|
The FS events are separate from exclude, as "exclude" only excludes the file from the source file scanning at startup. It doesn't exclude it from file watching or exclude it from being importable. The fix I'm applying will still cause the log to happen in verbose mode (it is verbose mode), but the event will be ignored. |
I've made the above change to suppress these |
This issue has been fixed in version 2021.5.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202153-19-may-2021 |
I apologize if this has already been asked, but I couldn't quickly find a clear similar issue.
In the monorepo at Robinhood I'm experiencing extended time searching for source files.
It seems like there are too many files (~44k), but I couldn't seem to find a setting to exclude paths from analysis.
Basically this searching for source files will block for ~5+ seconds on every analyze causing autocomplete and go to definitions to be extremely slow.
Python Version:
3.8.6
VSCode Version:
1.56.0
Python Extension:
2021.5.829140558
Pylance Version:
2021.5.2
Settings:
Examples:
The text was updated successfully, but these errors were encountered: