ipc: use vql for uint types (#167407)

* ipc: use vql for uint types

On the plane I was reverse-engineering ipc.ts to implement it in Rust
and see if we could have a "service mode" for the CLI that we could
interact with like any other vscode process.

In doing so, I noticed that numbers in the protocol--which are used at
least twice in the message header and ID--were encoded as JSON. I was
curious what benefits we'd get from encoding them as variable-length
integers instead.

It makes the message shorter, as expected. Encode/decode time are very,
very slightly lower. I'm not sure it's worth the extra complexity, but
I have included it here for your consideration.

* fixup tests
This commit is contained in:
Connor Peet
2022-12-02 15:54:36 -08:00
committed by GitHub
parent 07956026d7
commit 0899758dae
3 changed files with 83 additions and 27 deletions

View File

@@ -27,7 +27,7 @@ Unit tests from layers `common` and `browser` are run inside `chromium`, `webkit
## Run (with node)
yarn run mocha --ui tdd --run src/vs/editor/test/browser/controller/cursor.test.ts
yarn test-node --run src/vs/editor/test/browser/controller/cursor.test.ts
## Coverage