rokucommunity / rokucommunity/brighterscript
Lazy LSP project activation: activate projects on first file interaction, not all at startup
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Currently on startup, the language server activates all discovered projects immediately. For workspaces with many bsconfig.json files (e.g. monorepos, multi-channel workspaces), this means loading and compiling every project upfront, which is expensive.
Proposed approach
- On startup, scan for all projects and parse their
bsconfig.jsonfiles (to know which files belong to each project), but do not activate them (no compilation, no full program load) - Activate a project lazily the first time any file from its
filesarray is seen flowing through the editor (open, focus, hover, go-to-def — any editor event, not just file-change events) - Add a
brightscript.languageServer.activationModeVS Code setting with values:"eager"— current behavior: activate all projects at startup"lazy"— new behavior: activate on first file touch
Open question: Should activationMode also be settable in bsconfig.json for per-project control? This would let a large shared library opt into eager loading even if the workspace default is lazy.
Tradeoffs
- Pro: Faster startup, lower memory in large workspaces; unused projects never load
- Con: First interaction with a new project has latency while it activates; no pre-baking benefit for large projects under
lazymode (which is whyeagershould remain an option)
Contributor guide
No contributing guide indexed for this repository
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
Start by tracing the language server's startup project discovery and activation flow, including how bsconfig.json files are parsed and how editor events expose file interactions. Define the eager and lazy activation paths, then verify that the brightscript.languageServer.activationMode setting controls them and that projects activate on the first relevant editor event without loading unused projects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, performance, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100