microsoft / microsoft/TypeScript
Consider some way of serializing open projects in tsserver, potentially leveraging `.tsbuildinfo` files
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
One thing that users often hit is that file navigation might trigger opening an entire project. Opening an entire project involves
- File loading
- Scanning/parsing
- Resolving dependencies
- Keep repeating file loading on dependencies until no new files are found
This is a lot of work! If a user jumps back and forth from this file, it can re-trigger this work even if nothing has changed!
A .tsbuildinfo file is used to save time on cold compiler invocations doing this exact set of work, and to reduce work when something actually has changed. It would be interesting to see whether generating a .tsbuildinfo file after project loads could help cut down on this work.
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
Start by investigating how tsserver opens projects and how .tsbuildinfo files are generated and consumed. Compare repeated project loads when files are unchanged, and define whether serialization can reduce that work without changing behavior. Done would require an agreed design and evidence that unchanged projects avoid unnecessary loading, parsing, and dependency resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100