Skip to content
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

Merged
merged 2 commits into from Dec 1, 2023

Conversation

bartlomieju
Copy link
Member

No description provided.

state: &mut OpState,
#[serde] args: SpecifierArgs,
) -> Result<Option<LoadResponse>, AnyError> {
) -> Result<v8::Local<'s, v8::Value>, AnyError> {
Copy link
Member Author

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,
Copy link
Member Author

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.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit ec0207e into denoland:main Dec 1, 2023
14 checks passed
@bartlomieju bartlomieju deleted the lsp_op_logging branch December 1, 2023 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants