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: remove current_dir() call in Deno.mainModule #17883

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

dsherret
Copy link
Member

No description provided.

@@ -23,9 +23,7 @@ fn op_main_module(state: &mut OpState) -> Result<String, AnyError> {
let main = state.borrow::<ModuleSpecifier>().to_string();
let main_url = deno_core::resolve_url_or_path(&main)?;
Copy link
Member

Choose a reason for hiding this comment

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

This line could be removed too

@ry
Copy link
Member

ry commented Feb 22, 2023

How much of a improvement is this?

@dsherret dsherret requested a review from bartlomieju February 22, 2023 22:34
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM.

I don't think there's noticeable performance improvement, since this code is rarely in the hot path.

@dsherret dsherret merged commit a31d886 into denoland:main Feb 22, 2023
@dsherret dsherret deleted the perf_remove_std_env_deno_main_module branch February 22, 2023 23:22
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.

3 participants