PVer4: Test checksum on startup outside the hotpath of DB load
On startup, when MergeUpdate is called, the old_prefixes_map is empty. When we detect this case, we shortcut the merge process.
* Instead of merging the hash prefixes in lexicographical order, one by one, we copy the additions_map into the hash_prefix_map_.
* Then, instead of checking the checksum at this time, we post a task to the task runner to verify the checksum.
When that task runs, if the checksum matches, it returns silently; otherwise, it clears out the state and the hash_prefix_map_ of the store.
This reduces the merge time for Malware and SocialEngineering lists by about 5 seconds total on my machine and brings the DB load time to <1s from 12s previously.
9 files changed