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

Issue 7044102: Another performance improvement for phone library - at least +25% to previous cl (982ms for 100 i... (Closed)

Created:
9 years, 6 months ago by GeorgeY
Modified:
9 years, 6 months ago
Reviewers:
Ilya Sherman, dhollowa
CC:
chromium-reviews, dhollowa
Visibility:
Public.

Description

Another performance improvement for phone library - at least +25% to previous cl (982ms for 100 items DB test comared to 1251ms) But feels like much more as the penalty shifted to DB thread. TEST=The caching object is tested by multiple AutofillManager, PersonalDataManager, etc. unittests + new unit-test to test performance. BUG=85152 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90434

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 2

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 4

Patch Set 9 : '' #

Total comments: 4

Patch Set 10 : '' #

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -90 lines) Patch
M chrome/browser/autofill/phone_number.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/autofill/phone_number.cc View 1 2 3 4 5 6 7 8 9 7 chunks +23 lines, -38 lines 0 comments Download
M chrome/browser/autofill/phone_number_i18n.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +37 lines, -1 line 0 comments Download
M chrome/browser/autofill/phone_number_i18n.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +138 lines, -42 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
GeorgeY
Separated parsed phone caching into separate cl.
9 years, 6 months ago (2011-06-10 05:23:15 UTC) #1
Ilya Sherman
http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.cc File chrome/browser/autofill/phone_number_i18n.cc (right): http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.cc#newcode291 chrome/browser/autofill/phone_number_i18n.cc:291: } nit: The else stmt here makes the code ...
9 years, 6 months ago (2011-06-10 07:17:33 UTC) #2
dhollowa
http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.h File chrome/browser/autofill/phone_number_i18n.h (right): http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.h#newcode17 chrome/browser/autofill/phone_number_i18n.h:17: namespace phonenumbers { nit: namespaces don't indent when nested.
9 years, 6 months ago (2011-06-10 15:13:27 UTC) #3
GeorgeY
http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.cc File chrome/browser/autofill/phone_number_i18n.cc (right): http://codereview.chromium.org/7044102/diff/4001/chrome/browser/autofill/phone_number_i18n.cc#newcode291 chrome/browser/autofill/phone_number_i18n.cc:291: } On 2011/06/10 07:17:33, Ilya Sherman wrote: > nit: ...
9 years, 6 months ago (2011-06-10 22:36:35 UTC) #4
GeorgeY
Fixed scoped_ptr<> as well - it asked me for completed type, because it was autogenerating ...
9 years, 6 months ago (2011-06-10 23:24:50 UTC) #5
Ilya Sherman
Profiling results: With the ComparePhones() cache, the cost is something like 1080ms on the DB ...
9 years, 6 months ago (2011-06-11 03:46:21 UTC) #6
GeorgeY
On 2011/06/11 03:46:21, Ilya Sherman wrote: > Profiling results: With the ComparePhones() cache, the cost ...
9 years, 6 months ago (2011-06-18 00:35:41 UTC) #7
Ilya Sherman
I think the profiling suggests that the PhoneObject cache is not necessarily worth the additional ...
9 years, 6 months ago (2011-06-18 00:47:14 UTC) #8
GeorgeY
TEST: AutofillManagerTest.DeterminePossibleFieldTypesForUpload Average of five runs, rounded to the nearest ms: with cache without cache ...
9 years, 6 months ago (2011-06-20 22:59:11 UTC) #9
Ilya Sherman
On 2011/06/20 22:59:11, GeorgeY wrote: > TEST: AutofillManagerTest.DeterminePossibleFieldTypesForUpload > Average of five runs, rounded to ...
9 years, 6 months ago (2011-06-20 23:55:29 UTC) #10
GeorgeY
On 2011/06/20 23:55:29, Ilya Sherman wrote: > On 2011/06/20 22:59:11, GeorgeY wrote: > > TEST: ...
9 years, 6 months ago (2011-06-21 00:19:16 UTC) #11
Ilya Sherman
http://codereview.chromium.org/7044102/diff/18008/chrome/browser/autofill/phone_number_i18n.cc File chrome/browser/autofill/phone_number_i18n.cc (right): http://codereview.chromium.org/7044102/diff/18008/chrome/browser/autofill/phone_number_i18n.cc#newcode7 chrome/browser/autofill/phone_number_i18n.cc:7: #include <map> Do you still need this include? http://codereview.chromium.org/7044102/diff/18008/chrome/browser/autofill/phone_number_i18n.h ...
9 years, 6 months ago (2011-06-21 00:31:26 UTC) #12
GeorgeY
done http://codereview.chromium.org/7044102/diff/18008/chrome/browser/autofill/phone_number_i18n.cc File chrome/browser/autofill/phone_number_i18n.cc (right): http://codereview.chromium.org/7044102/diff/18008/chrome/browser/autofill/phone_number_i18n.cc#newcode7 chrome/browser/autofill/phone_number_i18n.cc:7: #include <map> On 2011/06/21 00:31:26, Ilya Sherman wrote: ...
9 years, 6 months ago (2011-06-21 23:24:44 UTC) #13
Ilya Sherman
LGTM, thanks. http://codereview.chromium.org/7044102/diff/18011/chrome/browser/autofill/phone_number_i18n.h File chrome/browser/autofill/phone_number_i18n.h (right): http://codereview.chromium.org/7044102/diff/18011/chrome/browser/autofill/phone_number_i18n.h#newcode108 chrome/browser/autofill/phone_number_i18n.h:108: std::string GetLocale() const { return locale_; } ...
9 years, 6 months ago (2011-06-21 23:46:12 UTC) #14
dhollowa
LGTM.
9 years, 6 months ago (2011-06-21 23:53:02 UTC) #15
GeorgeY
9 years, 6 months ago (2011-06-22 23:43:43 UTC) #16
http://codereview.chromium.org/7044102/diff/18011/chrome/browser/autofill/pho...
File chrome/browser/autofill/phone_number_i18n.h (right):

http://codereview.chromium.org/7044102/diff/18011/chrome/browser/autofill/pho...
chrome/browser/autofill/phone_number_i18n.h:108: std::string GetLocale() const {
return locale_; }
On 2011/06/21 23:46:12, Ilya Sherman wrote:
> nit: Why did you inline just one of these four? ;)

Initially I had lazy initialization of the other members, so the other functions
did some processing, this one was *never* intended to be anything other than
accessor.

http://codereview.chromium.org/7044102/diff/18011/chrome/browser/autofill/pho...
chrome/browser/autofill/phone_number_i18n.h:116: bool ValidNumber() const {
return i18n_number_ != NULL; }
On 2011/06/21 23:46:12, Ilya Sherman wrote:
> nit: Perhaps "IsValidNumber" rather than "ValidNumber"?

Sure

Powered by Google App Engine
This is Rietveld 408576698