summaryrefslogtreecommitdiff
path: root/cli/cache/module_info.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-24 10:15:46 -0400
committerGitHub <noreply@github.com>2024-05-24 10:15:46 -0400
commitb21004b1d16ad7b67c7b1cd235abf792bf9d9777 (patch)
tree2a89a04d2d87d8e30a34beb97cbccf320dbef0ac /cli/cache/module_info.rs
parent92a8d09e498712aec2ba0e54a1ad85194ebd83af (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 'cli/cache/module_info.rs')
-rw-r--r--cli/cache/module_info.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/cli/cache/module_info.rs b/cli/cache/module_info.rs
index 2e9274160..0e7a97678 100644
--- a/cli/cache/module_info.rs
+++ b/cli/cache/module_info.rs
@@ -87,23 +87,6 @@ impl ModuleInfoCache {
}
}
- pub fn get_module_source_hash(
- &self,
- specifier: &ModuleSpecifier,
- media_type: MediaType,
- ) -> Result<Option<ModuleInfoCacheSourceHash>, AnyError> {
- let query = "SELECT source_hash FROM moduleinfocache WHERE specifier=?1 AND media_type=?2";
- let res = self.conn.query_row(
- query,
- params![specifier.as_str(), serialize_media_type(media_type)],
- |row| {
- let source_hash: String = row.get(0)?;
- Ok(ModuleInfoCacheSourceHash(source_hash))
- },
- )?;
- Ok(res)
- }
-
pub fn get_module_info(
&self,
specifier: &ModuleSpecifier,