mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
perf(cli): use faster_hex (#22761)
`cli::util::checksum` was showing up on flame graphs because it was concatenating allocated strings. We can use `faster-hex` to improve it.
This commit is contained in:
parent
594d8397ad
commit
4791d16a8e
11 changed files with 32 additions and 24 deletions
|
@ -61,7 +61,7 @@ fn verify_tarball_integrity(
|
|||
let mut hash_ctx = Context::new(&ring::digest::SHA1_FOR_LEGACY_USE_ONLY);
|
||||
hash_ctx.update(data);
|
||||
let digest = hash_ctx.finish();
|
||||
let tarball_checksum = hex::encode(digest.as_ref());
|
||||
let tarball_checksum = faster_hex::hex_string(digest.as_ref());
|
||||
(tarball_checksum, hex)
|
||||
}
|
||||
NpmPackageVersionDistInfoIntegrity::UnknownIntegrity(integrity) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue