Comment 12 for bug 1934849

Revision history for this message
Nobuto Murata (nobuto) wrote :

I *think* hash calculation and verifier have to be outside of the loop to avoid the overhead. I will confirm it with a manual testing.

        for chunk in utils.chunkreadable(image_file, self.WRITE_CHUNKSIZE):
            image_data += chunk
            image_size += len(chunk)
            os_hash_value.update(chunk)
            checksum.update(chunk)
            if verifier:
                verifier.update(chunk)