Skip to content
Snippets Groups Projects
Commit 7c4128a1 authored by Adenilson Cavalcanti's avatar Adenilson Cavalcanti Committed by Commit Bot
Browse files

Fix performance issue in RAW mode

While investigating the use of RAW mode, I noticed that it was *slower*
for compression than GZIP or ZLIB wrapper formats, which didn't make
sense (i.e. we don't calculate a data integrity check using RAW mode).

It turns out that the code was falling back to the portable implementation
of insert_string(), instead of using the optimized version that rely on 'crc32w'
as a hash function.

The reason is that CPU features detection is not triggered while using
RAW mode (i.e. we never call crc32() with a NULL buffer).

This patch fixes this issue ensuring that RAW mode is going to be faster
for both compression/decompression than either ZLIB or GZIP formats.

Bug: 833361
Change-Id: I285297f67ffc0114700ed03c2186ad21aab8b40e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929634


Reviewed-by: default avatarChris Blume <cblume@chromium.org>
Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#717877}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 171a0a69eb5d70f8a9f44000e26bc7dc65f1fd97
parent e5c4d8c4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment