diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-04-12 16:04:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 16:04:54 -0700 |
commit | 3dacba5057369714c67b259071f2c36f919d92c6 (patch) | |
tree | 6d6362b5d586f14a5a3ebd2a5d8053a6c479d2d9 /cli/tsc/99_main_compiler.js | |
parent | 4e8d30fca19fa5fb588dd158da401407ff142e5a (diff) |
perf(lsp): Only deserialize response from `op_respond` once (#23349)
Previously we were deserializing it twice - once to `serde_json::Value`,
and then again from the `serde_json::Value` to a concrete type
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index c6beddf32..274fc1cca 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -1021,14 +1021,14 @@ delete Object.prototype.__proto__; } /** - * @param {number} id + * @param {number} _id * @param {any} data */ // TODO(bartlomieju): this feels needlessly generic, both type chcking // and language server use it with inefficient serialization. Id is not used // anyway... - function respond(id, data = null) { - ops.op_respond({ id, data }); + function respond(_id, data = null) { + ops.op_respond(JSON.stringify(data)); } function serverRequest(id, method, args) { |