See #46183 for background. There are two inefficiencies: - Calculating the hash loads the whole file into memory - The whole file is read twice (once for the CRC-32 and once for the SHA-1 hash).