perf(compile): read embedded files as static references when UTF-8 and reading as strings (#27033)

This commit is contained in:
David Sherret 2024-11-27 21:28:41 -05:00 committed by Bartek Iwańczuk
parent 27757e83e0
commit fdba58ce59
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
19 changed files with 158 additions and 61 deletions

2
cli/cache/mod.rs vendored
View file

@ -116,6 +116,8 @@ impl<'a> deno_cache_dir::DenoCacheEnv for DenoCacheEnvFsAdapter<'a> {
self
.0
.read_file_sync(path, None)
// todo(https://github.com/denoland/deno_cache_dir/pull/66): avoid clone
.map(|bytes| bytes.into_owned())
.map_err(|err| err.into_io_error())
}