mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
perf(compile): read embedded files as static references when UTF-8 and reading as strings (#27033)
This commit is contained in:
parent
27757e83e0
commit
fdba58ce59
19 changed files with 158 additions and 61 deletions
2
cli/cache/mod.rs
vendored
2
cli/cache/mod.rs
vendored
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue