Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 885033002: PasswordStoreMac: Use ScopedVector::weak_erase to improve performance (Closed)

Created:
5 years, 10 months ago by vabr (Chromium)
Modified:
5 years, 10 months ago
Reviewers:
vasilii
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PasswordStoreMac: Use ScopedVector::weak_erase to improve performance Following up on https://codereview.chromium.org/825773003/#msg26, this CL adds weak_erase() calls at some places, to speed-up deletion of ScopedVectors, which are arguably only containing null or dangling pointers. The benchmark from https://codereview.chromium.org/825773003/#msg24 showed on Mac, unlike on Linux, that weak_erase() + destruction takes (not surprisingly) constant time, whereas ommitting the weak_erase() is linear in the size of the vector. The CL adds the weak_erase in a slightly complicated way. Instead of just adding the weak_erase() calls, it creates a dedicated method for doing the operation of passing all owned objects out of a scoped vector, to ensure that future changes in the code don't easily add leaks through the weak_ptr. BUG=451018 Committed: https://crrev.com/c765343eb78c8199ec37aabbd9c0e8f1b79b447c Cr-Commit-Position: refs/heads/master@{#313952}

Patch Set 1 : #

Total comments: 16

Patch Set 2 : Just rebased #

Patch Set 3 : WIP: lambdas #

Patch Set 4 : WIP Lambdas (2) #

Patch Set 5 : WIP: lambdas (3) #

Patch Set 6 : Lambdas, without scoped_ptr #

Patch Set 7 : Lambdas + scoped_ptr #

Total comments: 8

Patch Set 8 : Comments addressed #

Patch Set 9 : Compily compily comp. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -54 lines) Patch
M chrome/browser/password_manager/password_store_mac.cc View 1 2 3 4 5 6 7 8 8 chunks +74 lines, -54 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
vabr (Chromium)
Hi Vasilii, Could you please have a look? Thanks! Vaclav https://codereview.chromium.org/885033002/diff/60001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/885033002/diff/60001/chrome/browser/password_manager/password_store_mac.cc#newcode200 ...
5 years, 10 months ago (2015-01-29 15:41:11 UTC) #5
vasilii
https://codereview.chromium.org/885033002/diff/60001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/885033002/diff/60001/chrome/browser/password_manager/password_store_mac.cc#newcode200 chrome/browser/password_manager/password_store_mac.cc:200: PasswordForm* BestKeychainFormForForm( On 2015/01/29 15:41:11, vabr (Chromium) wrote: > ...
5 years, 10 months ago (2015-01-29 16:41:13 UTC) #6
vabr (Chromium)
Thanks, Vasilii. Please have a look at patch set 6. The main change is the ...
5 years, 10 months ago (2015-01-30 12:57:09 UTC) #7
vabr (Chromium)
Hi Vasilii, This time I checked it compiles. Also, as discussed offline, the benchmark was ...
5 years, 10 months ago (2015-01-30 14:26:28 UTC) #8
vasilii
lgtm https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc#newcode222 chrome/browser/password_manager/password_store_mac.cc:222: // |move_form|, and clears |forms| efficiently. Expand the ...
5 years, 10 months ago (2015-01-30 14:43:34 UTC) #9
vabr (Chromium)
Thanks, Vasilii. I addressed your comments and will push patch set 7 to the CQ. ...
5 years, 10 months ago (2015-01-30 14:49:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/885033002/190001
5 years, 10 months ago (2015-01-30 14:50:04 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/19001)
5 years, 10 months ago (2015-01-30 15:07:42 UTC) #14
vasilii
https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc#newcode228 chrome/browser/password_manager/password_store_mac.cc:228: mover(form.Pass()); On 2015/01/30 14:49:51, vabr (Chromium) wrote: > On ...
5 years, 10 months ago (2015-01-30 15:29:08 UTC) #15
vabr (Chromium)
https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/885033002/diff/170001/chrome/browser/password_manager/password_store_mac.cc#newcode228 chrome/browser/password_manager/password_store_mac.cc:228: mover(form.Pass()); On 2015/01/30 15:29:08, vasilii wrote: > On 2015/01/30 ...
5 years, 10 months ago (2015-01-30 16:47:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/885033002/210001
5 years, 10 months ago (2015-01-30 16:48:57 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/28939)
5 years, 10 months ago (2015-01-30 17:49:41 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/885033002/210001
5 years, 10 months ago (2015-01-30 18:01:10 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:210001)
5 years, 10 months ago (2015-01-30 18:35:33 UTC) #23
commit-bot: I haz the power
5 years, 10 months ago (2015-01-30 18:37:32 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c765343eb78c8199ec37aabbd9c0e8f1b79b447c
Cr-Commit-Position: refs/heads/master@{#313952}

Powered by Google App Engine
This is Rietveld 408576698