Investigate compressing TS Server socket communication
See original GitHub issueProblem
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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (8 by maintainers)
Top GitHub Comments
I wonder if there’s an intermediate approach where only the
body
property of the response is compressed? That might make it easier for the server to decide per-message whether compression is worthwhile (assuming the client has opted in via user-preference).Seems we are repeating http protocol. :XD.
Another problem is TypeScript does not have external dependency (If i’m correct). So will we add something (for gzip) dependency, or just implement yet another compressor?