microsoft / microsoft/TypeScript

Consider some way of serializing open projects in tsserver, potentially leveraging `.tsbuildinfo` files

Open
#35,113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: LS: TSServer Domain: Performance Domain: tsc: --incremental Experimentation Needed In Discussion Needs Proposal Suggestion
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

  1. File loading
  2. Scanning/parsing
  3. Resolving dependencies
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.