diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-24 10:15:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-24 10:15:46 -0400 |
commit | b21004b1d16ad7b67c7b1cd235abf792bf9d9777 (patch) | |
tree | 2a89a04d2d87d8e30a34beb97cbccf320dbef0ac /runtime/fs_util.rs | |
parent | 92a8d09e498712aec2ba0e54a1ad85194ebd83af (diff) |
fix: use hash of in-memory bytes only for code cache (#23966)
* https://github.com/denoland/deno_core/pull/752
* https://github.com/denoland/deno_core/pull/753
Did benchmarking on this and it's slightly faster (couple ms) or equal
to in performance as main.
Closes #23904
Diffstat (limited to 'runtime/fs_util.rs')
-rw-r--r-- | runtime/fs_util.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/runtime/fs_util.rs b/runtime/fs_util.rs index 09b107300..fe9736038 100644 --- a/runtime/fs_util.rs +++ b/runtime/fs_util.rs @@ -63,17 +63,6 @@ pub fn specifier_to_file_path( } } -pub fn code_timestamp(specifier: &str) -> Result<u64, AnyError> { - let specifier = ModuleSpecifier::parse(specifier)?; - let path = specifier_to_file_path(&specifier)?; - #[allow(clippy::disallowed_methods)] - let timestamp = std::fs::metadata(path)? - .modified()? - .duration_since(std::time::UNIX_EPOCH)? - .as_millis() as u64; - Ok(timestamp) -} - #[cfg(test)] mod tests { use super::*; |