posit-dev / posit-dev/positron
Run included language packs/supervisor in a dedicated extension host for stability
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Currently, Positron runs all extensions in the same extension host. This means that our dedicated language packs (R, Python, etc.) as well as the supervisor/adapter share a single extension host process with third-party extensions. This has some obvious downsides; most importantly, a third party extension can crash or overwhelm the host process, resulting in problems with our own extensions.
VS Code's architecture allows multiple extension hosts at once to run, and has some experimental support for designating an "affinity" for an extension to run in a particular host with other extensions. Docs on this are sparse, but there's some related info here:
https://github.com/vscode-neovim/vscode-neovim/issues/1051
We should consider placing all of the language packs and their most critical supporting infrastructure (e.g. the kernel supervisor) in a dedicated extension host. This would help in a number of ways:
- It is likely to improve the stability of these extensions, since they no longer share as many resources with third-party code.
- It may also improve the throughput and/or performance of the extensions, since they will have dedicated IPC channels.
- If the extension host is crashing or unresponsive, we would know whether it is likely a result of our own extensions or a third party extension (see e.g. #5508).
However, there are also some tradeoffs to consider:
- An extension host is a Node process with a nontrivial overhead. Positron already has a pretty large overhead at boot.
- Default configurations don't use multiple extension host processes, and this configuration makes things more complicated. Positron itself did not support running language packs in auxiliary extension hosts initially.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests. Start by reading VS Code's extension-host affinity documentation and the linked vscode-neovim issue, then identify how Positron currently registers its language packs and supervisor. Done would require a decided and validated approach that isolates the critical extensions while accounting for process overhead and stability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, python, r, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100