diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-04-19 10:11:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 10:11:17 -0700 |
commit | b5ce9cda0dfaed4afcb85d71c2c49c82b2fe3401 (patch) | |
tree | d8bbfb54cb29976a1a40d7169e74b7533c52a037 /cli/lsp/tsc.rs | |
parent | f4b5eec52e01249b13d795010cd995113d9ef569 (diff) |
perf(lsp): Avoid passing struct into op_resolve (#23452)
Going through serde_v8 is slow, so just pass the args separately.
`op_resolve` is especially hot, so any speedups are good.
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 5b1136d90..16cca30e1 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4058,9 +4058,10 @@ fn op_release( #[serde] fn op_resolve( state: &mut OpState, - #[serde] args: ResolveArgs, + #[string] base: String, + #[serde] specifiers: Vec<String>, ) -> Result<Vec<Option<(String, String)>>, AnyError> { - op_resolve_inner(state, args) + op_resolve_inner(state, ResolveArgs { base, specifiers }) } #[inline] |