-
Notifications
You must be signed in to change notification settings - Fork 93
Replies: 3 comments · 13 replies
-
Hey @tenFnAN, thank you for the initial context you've provided. Let's grab some Python kernel logs to further diagnose the problem you're seeing. Could you please do the following the next time you reproduce this issue:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @tenFnAN! Was there any further output? For example, when I try to trigger autocomplete in a [Python] [positron_ipykernel._vendor.pygls.protocol.json_rpc] Received b'{"jsonrpc":"2.0","id":19,"method":"textDocument/completion","params":{"textDocument":{"uri":"file:///Users/sashimi/qa-example-content/workspaces/python-plots/plotly-example.py"},"position":{"line":2,"character":2},"context":{"triggerKind":1}}}' @seeM could having multiple large notebooks open affect autocomplete in |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think the @sharon-wang I don't think so... Each notebook starts its own kernel and has its own language server so there shouldn't be any interaction there. Might be worth monitoring CPU and RAM usage when these lags happen and see if anything is maxing out? EDIT: And notebook kernels/language servers are also separate from the Console's. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
I copied the entire output; there was nothing more. I have set languageServerLogLevel to debug, as suggested by @sharon-wang , but honestly, in the Below is the output from the Pyright logs, right after starting Positron, perhaps this is a hint?
|
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thank you for the additional info @tenFnAN! To modify the log level setting:
Now that the log setting is updated, please try to reproduce the autocomplete issue you're seeing, then capture the logs (copying the instructions from earlier):
@seeM, this Pyright error is interesting: |
Beta Was this translation helpful? Give feedback.
All reactions
-
@sharon-wang Pyright is totally independent from our language server, so I don't expect them to interact. Unless there are resource issues and CPU/RAM is maxing out. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
I tried to copy the entire content of the logs, but I received a message that the character limit was too high, so I have shared the content in the link below. The logs were copied shortly after I experienced an issue with autocompletion. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@tenFnAN I'm getting a 404 error when accessing the Gist link. Could you please check that the Gist can be publicly accessed? Alternatively, you can paste the log output to a text file and upload the file in a comment here. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@sharon-wang I have the same issue, I don’t understand why, but you just need to copy the entire link and paste it into the browser you are using, and it works. :)" |
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
-
Thanks @tenFnAN, apologies as this was just realized, but for your awareness, the logs could reveal the contents of the documents you had open. Is this something you're comfortable with? I've deleted the Gist link from your comment for the time being, just in case that's not something you're comfortable with. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @sharon-wang for keeping an eye on this! I wasn’t sure whether to share these logs, but I really want to find a solution, so I decided to upload them :). I knew I’d remove the file later anyway. Is there any other way I can share these logs with you to check if there's anything unusual in them? I don’t mind if people working on Positron take a look, but I’d rather not have a wider audience seeing the file. I just need someone from your team to review the log file and let me know if anything stands out. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sounds good! We were able to access the log you provided in the Gist and will take a look to see if there's anything that sticks out. We'll update you here with any findings 👍 |
Beta Was this translation helpful? Give feedback.
All reactions
-
@sharon-wang Okay, I've looked through the logs and found two possible performance issues: Issue 1: Slow requestsThere were two requests in the logs that were extremely slow, ~15 seconds and ~30 seconds each. In this case, it happened with Unfortunately, we might not be able to do much here and we might be limited by Jedi (Jedi performance issues appear to be tracked here: davidhalter/jedi-vim#1118). It's possible that we could implement some server-level optimizations too, for example something like python-lsp/python-lsp-server#26, but we'd need a reproducible example to know what to optimize. Issue 2: Pygls handles requests that are known to be cancelledThere's an issue in pygls (openlawlibrary/pygls#517) which may cause these slow requests to snowball and effectively hang the server for much longer (in the logs, a ~30 second request ended up hanging the server for 90 seconds at which point the logs ended). We might be able to patch this relatively easily though. I'll try to put up a PR soon. |
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
-
Just merged #6219 which runs |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks! I appreciate the fix. I’ll test it once the next release is available and share my feedback |
Beta Was this translation helpful? Give feedback.
-
I am experiencing a very frustrating issue with Positron's IntelliSense functionality. Occasionally, in .py files, autocomplete suggestions are not displayed. Below are some observations and examples, along with screenshots for reference.
### Key Observations:
The issue occurs for various objects:
No issues in .ipynb files: Autocomplete works quickly and reliably there.
Analogous issue with "Go to Definition": Sometimes this functionality is also unresponsive.
File-specific behavior:
Project context:
I am working on a computer vision project involving many files (images + videos).
The scripts are not overly complex but import several libraries.
Timing and patterns:
The issue often starts after some time working in the project on a given day.
It resolves temporarily, but then reappears after I write more code.
Environment context:
I don’t keep large files in memory within my environment.
The issue seems to behave as if "something gets clogged."
### My Questions:
Environment Details:
Positron Version: 2025.01.0 (Universal) build 159
Code - OSS Version: 1.95.0
Commit: bc8820b
Date: 2025-01-09T23:29:00.471Z
Electron: 32.2.1
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.4.0
I would be very grateful for any suggestions and assistance!
Beta Was this translation helpful? Give feedback.
All reactions