Skip to content

Commit c6f5b57

Browse files
committed
chore: cleanup to todo comment about crc32c validation
1 parent 8d4d7a3 commit c6f5b57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/BlobDescriptorStream.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ public void onResponse(BidiReadObjectResponse response) {
259259
int crc32C = checksummedData.getCrc32C();
260260

261261
try {
262-
// todo: benchmark how long it takes to compute this checksum and whether it needs to
263-
// happen on a non-io thread
262+
// On a Threadripper PRO 3945WX
263+
// java11+ calculating the crc32c of a 2MiB segment is ~70us
264+
// java8 the same calculation is ~1600us
265+
// not something to worry about offloading to another thread at this time.
264266
Hasher.enabled().validateUnchecked(Crc32cValue.of(crc32C), content);
265267
} catch (UncheckedChecksumMismatchException e) {
266268
read.recordError(

0 commit comments

Comments
 (0)