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

Docs should include guidance on using Pylance on low power devices #5881

Open
debonte opened this issue May 15, 2024 · 5 comments
Open

Docs should include guidance on using Pylance on low power devices #5881

debonte opened this issue May 15, 2024 · 5 comments
Assignees
Labels
needs documentation Improvements or additions to documentation perf

Comments

@debonte
Copy link
Contributor

debonte commented May 15, 2024

From Marketplace review:

Simon Howroyd
7 hours ago
Works fine on desktop but in a dev container, particularly on lower power embedded ARM32 devices it has to be disabled.
Main issue is if you save a file it seems to take a chunk of memory and cpu to "analyze files," if that has not completed and you save another file it takes another chunk of resources. Do that 3 or 4 times within a couple of minutes and it will crash my ARM32 application processor.
Some guidance in the docs on how to use pylance on lower power devices would be very helpful.

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label May 15, 2024
@debonte debonte added needs documentation Improvements or additions to documentation perf and removed needs repro Issue has not been reproduced yet labels May 15, 2024
@howroyd
Copy link

howroyd commented May 15, 2024

Thanks. If you need more details then please let me know

@rchiodo
Copy link
Contributor

rchiodo commented May 15, 2024

Can you include a log as described here?

https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

My suspicion is that we're running out of memory. There are some things we outline here that you can do to alleviate that problem:

https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#exclude-unneeded-py-files-from-analysis

@heejaechang
Copy link
Contributor

another data that could be helpful is providing this info (https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-cpuprofiles)

basically do

  1. start profiling
  2. save the file (assuming that is the repro step as described in the issue)
  3. stop profiling

and provide the profile data to us.

@howroyd
Copy link

howroyd commented May 16, 2024

I suspect out of memory too, the device only has 1GB RAM of which the container only really gets about 400-500MB. For reference this is running on a Dual ARM Cortex-A9 MPCore (600MHz).

I shall attempt some profiling but will need to ensure no sensitive info is in the logs, so please bear with me. It might also be tricky to get a representative profile of the full issue since that would cause a full crash. Will do my best!

@heejaechang
Copy link
Contributor

@luabud we might want to add low resource mode where we turn off most of features except only core ones.

basically, only enables these features and turn off everything else.

  1. completion
  2. hover
  3. signature help
  4. go to definition/declartion/typedeclaration
  5. document symbol
  6. auto indentation
  7. format on type
  8. selection range
  9. folding range
  10. syntax errors
  11. open files only

turn off

  1. find all references
  2. highlight references
  3. pytest completion/hover/go to/...
  4. workspace symbols
  5. semantic errors
  6. semantic coloring
  7. inlay hints
  8. code actions
  9. indexing
  10. rename
  11. no worker threads
  12. no workspace diagnostics
  13. and anything expensive.

basically, we provide only cheap features that help typing but nothing else. it will be a little bit better than plain text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs documentation Improvements or additions to documentation perf
Projects
None yet
Development

No branches or pull requests

4 participants