New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(lsp): better op performance logging #21423
Conversation
state: &mut OpState, | ||
#[serde] args: SpecifierArgs, | ||
) -> Result<Option<LoadResponse>, AnyError> { | ||
) -> Result<v8::Local<'s, v8::Value>, AnyError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return an array with 3 elements here, instead of using an object (lower pressure on GC and faster to serialize because no need to serialize 3 keys as strings)
#[op2] | ||
#[string] | ||
fn op_script_version( | ||
state: &mut OpState, | ||
#[serde] args: ScriptVersionArgs, | ||
#[string] specifier: &str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight perf improvement - no need to use an object here if it's a single string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.