|
|
Created:
4 years, 5 months ago by vakh (use Gerrit instead) Modified:
4 years, 5 months ago Reviewers:
Nathan Parker CC:
chromium-reviews, Scott Hess - ex-Googler, palmer Base URL:
https://chromium.googlesource.com/chromium/src.git@01_read_map_from_disk Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionPVer4: Keep track of the smallest hashes not their sizes.
Also, replace counters with iterators to avoid multiplications
BUG=543161
Committed: https://crrev.com/4386b67601ca07f067fa21e21ae7d42dd1430ee3
Cr-Commit-Position: refs/heads/master@{#405662}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Simplify: keep track of the smallest hashes not their sizes when merging #Patch Set 3 : Tiny: Comment update #Patch Set 4 : tiny: remove an unused variable #Patch Set 5 : git pull #
Total comments: 1
Patch Set 6 : Update comment about iterator initialization #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 32 (18 generated)
vakh@chromium.org changed reviewers: + nparker@chromium.org
lgtm The multiply is basically free, compared to memory access, so this isn't really a performance change. It might be slightly more readable, I can't decide. https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:207: smallest_prefix = current_prefix; could do smallest_prefix.swap(current_prefix) https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:230: return std::string(start, end); could add a dcheck that end <= hash_prefix_map.at(prefix_size).end(). Or... remove hash_prefix_map from the function altogether.
Simplify: keep track of the smallest hashes not their sizes when merging
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Minor: PVer4: Replace counters with iterators to avoid multiplications BUG=543161 ========== to ========== PVer4: Keep track of the smallest hashes not their sizes. Also, replace counters with iterators to avoid multiplications BUG=543161 ==========
I've updated the code more than I should have after getting an LGTM so please take another look. https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:207: smallest_prefix = current_prefix; On 2016/07/14 22:09:32, Nathan Parker wrote: > could do > smallest_prefix.swap(current_prefix) Done. https://codereview.chromium.org/2145163003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:230: return std::string(start, end); On 2016/07/14 22:09:32, Nathan Parker wrote: > could add a dcheck that end <= hash_prefix_map.at(prefix_size).end(). Or... > remove hash_prefix_map from the function altogether. Even better. Removed the method entirely and made the MergeUpdate method simpler.
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Tiny: Comment update
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...)
tiny: remove an unused variable
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
git pull
lgtm https://codereview.chromium.org/2145163003/diff/80001/components/safe_browsin... File components/safe_browsing_db/v4_store.h (right): https://codereview.chromium.org/2145163003/diff/80001/components/safe_browsin... components/safe_browsing_db/v4_store.h:220: // Sets a value of 0 in |iterator_map| for all keys in |hash_prefix_map|. This isn't zero, since it's an iterator, ya?
Update comment about iterator initialization
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by vakh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nparker@chromium.org Link to the patchset: https://codereview.chromium.org/2145163003/#ps100001 (title: "Update comment about iterator initialization")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== PVer4: Keep track of the smallest hashes not their sizes. Also, replace counters with iterators to avoid multiplications BUG=543161 ========== to ========== PVer4: Keep track of the smallest hashes not their sizes. Also, replace counters with iterators to avoid multiplications BUG=543161 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== PVer4: Keep track of the smallest hashes not their sizes. Also, replace counters with iterators to avoid multiplications BUG=543161 ========== to ========== PVer4: Keep track of the smallest hashes not their sizes. Also, replace counters with iterators to avoid multiplications BUG=543161 Committed: https://crrev.com/4386b67601ca07f067fa21e21ae7d42dd1430ee3 Cr-Commit-Position: refs/heads/master@{#405662} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/4386b67601ca07f067fa21e21ae7d42dd1430ee3 Cr-Commit-Position: refs/heads/master@{#405662}
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2151193002/ by henrika@chromium.org. The reason for reverting is: Breaks V4StoreTest tests on Win7 https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.win%2FWin7_Test....
Message was sent while issue was closed.
On 2016/07/15 07:53:11, henrika wrote: > A revert of this CL (patchset #6 id:100001) has been created in > https://codereview.chromium.org/2151193002/ by mailto:henrika@chromium.org. > > The reason for reverting is: Breaks V4StoreTest tests on Win7 > > https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.win%2FWin7_Test.... Here's the uberchromegw link: https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%... |