diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-04-01 10:12:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 10:12:40 -0400 |
commit | ae1ba2af3c0dc45de074285f0e0a8440cf2895ec (patch) | |
tree | fb298bdb5be9da8ed1c6af18c45c470994a0f3c6 /cli/tools/check.rs | |
parent | 23b9be7b37c40f8c29f9ce50439ad0e25b85282c (diff) |
perf(check): faster source hashing (#18534)
Diffstat (limited to 'cli/tools/check.rs')
-rw-r--r-- | cli/tools/check.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/tools/check.rs b/cli/tools/check.rs index 12f9d06b5..804519e84 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -89,10 +89,12 @@ pub fn check( // to make tsc build info work, we need to consistently hash modules, so that // tsc can better determine if an emit is still valid or not, so we provide // that data here. - let hash_data = vec![ - options.ts_config.as_bytes(), - version::deno().as_bytes().to_owned(), - ]; + let hash_data = { + let mut hasher = FastInsecureHasher::new(); + hasher.write(&options.ts_config.as_bytes()); + hasher.write_str(version::deno()); + hasher.finish() + }; let response = tsc::exec(tsc::Request { config: options.ts_config, |