-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(compile): read embedded files as static references when UTF-8 and reading as strings #27033
perf(compile): read embedded files as static references when UTF-8 and reading as strings #27033
Conversation
da7f3bc
to
681db9a
Compare
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
// todo(https://github.com/denoland/deno_config/pull/140): avoid clone | ||
.map(|s| s.into_owned()) |
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.
I guess this can be addressed now since it was landed in denoland/deno_config#141. I can take care of that in my PR.
// todo(https://github.com/denoland/deno_package_json/pull/9): don't clone | ||
.map(|text| text.into_owned()) |
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.
This can addressed in #27096
@@ -887,6 +892,8 @@ impl<'a> deno_package_json::fs::DenoPkgJsonFs for DenoPkgJsonFsAdapter<'a> { | |||
self | |||
.0 | |||
.read_text_file_lossy_sync(path, None) | |||
// todo(https://github.com/denoland/deno_package_json/pull/9): don't clone | |||
.map(|text| text.into_owned()) |
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.
Ditto
…d reading as strings (#27033)
Speed
I also checked perf of just reading a file from the file system and it is the same as before (expected... just was making sure that didn't regress somehow)
Memory Usage