microsoft / microsoft/TypeScript
Investigate compressing TS Server socket communication
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Problem
On desktop, TS Server uses a json based protocol. This protocol up being quite verbose for larger documents, especially for requests such as navTree which return results from the entire file
Just opening checker.ts for example results in individual requests and responses that are a few MB in size.
Proposal
We've seen up to a 10x reduction of on the wire data by enabling websocket per-message compression for VS Code's internal communications. We aren't using web sockets here, but I believe we should be able to fairly easily compress individual messages on the server side and decompress them on the editor side. Most importantly, we could enable this without any changes to the json protocol itself.
For backwards compatibility, this would have to be an opt-in feature
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 tracing TS Server's socket communication between the server and editor, focusing on the JSON message format and large navTree responses. Review the proposed per-message compression approach and its opt-in requirement; done means reducing wire size without changing the JSON protocol or breaking uncompressed clients.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools, networking, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100