-
Notifications
You must be signed in to change notification settings - Fork 768
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
How to set pylance memory max limitation? #5799
Comments
Otherwise, if there anyway to let pylance NOT analysis special directory or soft link? I've found that when I create a soft link to my HUGE dataset that causes pylance crash. |
There is an exclude option: https://github.com/microsoft/pyright/blob/main/docs/configuration.md |
Additionally see the directions here: |
However, we'd rather just fix your memory issue. Can you share your source so we can try and fix the root cause of the problem? |
I tried an experiment with a recursive symlinked folder. Folder looked like this without linking:
Where importer.py looks like this:
And funcs.py looks like this:
And the Then I symlinked Running this in Pylance I get indexing results like so:
With output like so:
And it chews up memory pretty fast. I'm honestly not sure what eventually stops it. We might hit some maximum import resolution depth. |
Thanks for your helps. Seems the key point is not depth of directory but num of files. In the soft link under my workspace there's more than 50000000 .jpg files and cause pylance crash. After move the soft link out of my workspace and reload vscode, pylance reworks well. |
Pylance works fine when workspace is small but crashed when huge.
Pylance has crashed. Would you like to try using a Node.js executable to run the language server?
Report issue is
As shown above :
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
But I have 256G memory on my server which is enough for pylance. How to set the max limitation of memory occupy?
The text was updated successfully, but these errors were encountered: