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

Issue 1983773002: Cache SearchEngineType of TemplateURL (Closed)

Created:
4 years, 7 months ago by Vitaly Baranov
Modified:
4 years, 6 months ago
CC:
bondd+autofillwatch_chromium.org, chromium-reviews, David Black, dhollowa+watch_chromium.org, donnd+watch_chromium.org, dougw+watch_chromium.org, estade+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, Jered, jfweitz+watch_chromium.org, kmadhusu+watch_chromium.org, melevin+watch_chromium.org, Matt Giuca, rouslan+autofill_chromium.org, samarth+watch_chromium.org, skanuj+watch_chromium.org, tapted, tfarina, vabr+watchlistautofill_chromium.org, vasilii+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@refactor-extracting-terms-from-template-url
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cache SearchEngineType of TemplateURL. TemplateURLPrepopulateData::GetEngineType() is slow and frequently called even for prepopulated engines. This patch fixes it. BUG=612369 Committed: https://crrev.com/da6a5018316e1a0912e606bdca9b06dc03ff567d Cr-Commit-Position: refs/heads/master@{#399752}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Remove variable TemplateURL::engine_type_ #

Patch Set 3 : Move calculation to TemplateURLData #

Total comments: 8

Patch Set 4 : Fix review issues #

Patch Set 5 : Move engine_type_ to TemplateURL #

Total comments: 2

Patch Set 6 : Make code shorter #

Patch Set 7 : Rebase #

Patch Set 8 : Apply changes to popular_sites.cc #

Patch Set 9 : Fix typo #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -54 lines) Patch
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/search/local_ntp_source.cc View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_view_delegate.cc View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/start_page_service.cc View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M components/ntp_tiles/popular_sites.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M components/omnibox/browser/base_search_provider.cc View 1 2 3 4 5 6 2 chunks +1 line, -3 lines 0 comments Download
M components/omnibox/browser/search_provider.cc View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M components/search_engines/prepopulated_engines.json View 1 2 3 4 5 6 1 chunk +1 line, -1 line 2 comments Download
M components/search_engines/search_engine_type.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/search_engines/template_url.h View 1 2 3 4 3 chunks +9 lines, -0 lines 0 comments Download
M components/search_engines/template_url.cc View 1 2 3 4 5 6 4 chunks +15 lines, -1 line 0 comments Download
M components/search_engines/template_url_prepopulate_data.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -11 lines 0 comments Download
M components/search_engines/template_url_prepopulate_data.cc View 1 2 3 3 chunks +6 lines, -11 lines 0 comments Download
M components/search_engines/template_url_prepopulate_data_unittest.cc View 1 2 3 4 5 6 4 chunks +16 lines, -6 lines 0 comments Download
M components/search_engines/template_url_service.cc View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 90 (50 generated)
Vitaly Baranov
4 years, 7 months ago (2016-05-16 06:53:55 UTC) #5
Vitaly Baranov
4 years, 7 months ago (2016-05-16 07:01:13 UTC) #8
Peter Kasting
Is there a bug for this? Can the bug have some relevant trace or other ...
4 years, 7 months ago (2016-05-16 08:49:05 UTC) #9
Vitaly Baranov
On 2016/05/16 08:49:05, Peter Kasting wrote: > Is there a bug for this? Can the ...
4 years, 7 months ago (2016-05-17 04:00:39 UTC) #12
Peter Kasting
https://codereview.chromium.org/1983773002/diff/60001/components/search_engines/keyword_table.cc File components/search_engines/keyword_table.cc (right): https://codereview.chromium.org/1983773002/diff/60001/components/search_engines/keyword_table.cc#newcode393 components/search_engines/keyword_table.cc:393: BindURLToStatement(data, &s, 25, 0); // "24" binds id() as ...
4 years, 7 months ago (2016-05-17 04:43:04 UTC) #13
Vitaly Baranov
https://codereview.chromium.org/1983773002/diff/60001/components/search_engines/keyword_table.cc File components/search_engines/keyword_table.cc (right): https://codereview.chromium.org/1983773002/diff/60001/components/search_engines/keyword_table.cc#newcode393 components/search_engines/keyword_table.cc:393: BindURLToStatement(data, &s, 25, 0); // "24" binds id() as ...
4 years, 6 months ago (2016-06-03 15:31:45 UTC) #15
Peter Kasting
The way this is designed has several problems I think are related. * You added ...
4 years, 6 months ago (2016-06-04 01:50:23 UTC) #16
Vitaly Baranov
Done.
4 years, 6 months ago (2016-06-05 06:12:07 UTC) #17
Vitaly Baranov
I've added a new unit-test to template_url_prepopulate_data_unittest.cc because I guess it's useful to check that ...
4 years, 6 months ago (2016-06-06 17:41:21 UTC) #18
Peter Kasting
LGTM with one major change https://codereview.chromium.org/1983773002/diff/140001/components/search_engines/template_url_data.h File components/search_engines/template_url_data.h (right): https://codereview.chromium.org/1983773002/diff/140001/components/search_engines/template_url_data.h#newcode48 components/search_engines/template_url_data.h:48: const TemplateURL* template_url_hint = ...
4 years, 6 months ago (2016-06-09 23:00:57 UTC) #19
Vitaly Baranov
And I think the engine_type_ field should be moved from TemplateURLData to TemplateURL because we ...
4 years, 6 months ago (2016-06-12 07:29:16 UTC) #23
Vitaly Baranov
On 2016/06/12 07:29:16, Vitaly Baranov wrote: > And I think the engine_type_ field should be ...
4 years, 6 months ago (2016-06-12 08:07:34 UTC) #25
Peter Kasting
LGTM https://codereview.chromium.org/1983773002/diff/260001/components/search_engines/template_url.cc File components/search_engines/template_url.cc (right): https://codereview.chromium.org/1983773002/diff/260001/components/search_engines/template_url.cc#newcode1346 components/search_engines/template_url.cc:1346: } Nit: Shorter: engine_type_ = url.is_valid() ? TemplateURLPrepopulateData::GetEngineType(url) ...
4 years, 6 months ago (2016-06-12 10:42:17 UTC) #26
Vitaly Baranov
https://codereview.chromium.org/1983773002/diff/260001/components/search_engines/template_url.cc File components/search_engines/template_url.cc (right): https://codereview.chromium.org/1983773002/diff/260001/components/search_engines/template_url.cc#newcode1346 components/search_engines/template_url.cc:1346: } On 2016/06/12 10:42:17, Peter Kasting wrote: > Nit: ...
4 years, 6 months ago (2016-06-13 09:43:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/280001
4 years, 6 months ago (2016-06-13 09:44:24 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/20012) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-13 09:46:17 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/300001
4 years, 6 months ago (2016-06-13 11:52:19 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/20041) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-13 11:54:38 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/340001
4 years, 6 months ago (2016-06-13 20:51:39 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/80747) android_compile_dbg on tryserver.chromium.android (JOB_FAILED, ...
4 years, 6 months ago (2016-06-13 20:56:31 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/360001
4 years, 6 months ago (2016-06-13 21:17:41 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/20376) ios-simulator on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-13 21:27:52 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/400001
4 years, 6 months ago (2016-06-14 03:52:55 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/20547) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-14 03:54:48 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/420001
4 years, 6 months ago (2016-06-14 04:07:08 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/20553) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-14 04:08:45 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/460001
4 years, 6 months ago (2016-06-14 04:41:29 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/200155)
4 years, 6 months ago (2016-06-14 04:49:03 UTC) #69
Vitaly Baranov
treib@chromium.org: Please review changes in components/ntp_tiles/popular_sites.cc thestig@chromium.org: Please review changes in chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc chrome/browser/search/local_ntp_source.cc
4 years, 6 months ago (2016-06-14 05:34:55 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/480001
4 years, 6 months ago (2016-06-14 05:38:40 UTC) #76
Marc Treib
local_ntp_source.cc and popular_sites.cc LGTM
4 years, 6 months ago (2016-06-14 09:50:00 UTC) #77
Lei Zhang
On 2016/06/14 05:34:55, Vitaly Baranov wrote: > mailto:thestig@chromium.org: Please review changes in > chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc > ...
4 years, 6 months ago (2016-06-14 17:26:06 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983773002/480001
4 years, 6 months ago (2016-06-14 17:28:09 UTC) #80
commit-bot: I haz the power
Committed patchset #9 (id:480001)
4 years, 6 months ago (2016-06-14 18:20:53 UTC) #82
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-14 18:20:59 UTC) #83
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/da6a5018316e1a0912e606bdca9b06dc03ff567d Cr-Commit-Position: refs/heads/master@{#399752}
4 years, 6 months ago (2016-06-14 18:23:46 UTC) #85
Alexander Yashkin
https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json File components/search_engines/prepopulated_engines.json (left): https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json#oldcode33 components/search_engines/prepopulated_engines.json:33: "kCurrentDataVersion": 91 kCurrentDataVersion becomes 90 with previous version of ...
4 years, 6 months ago (2016-06-15 06:55:23 UTC) #87
Peter Kasting
https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json File components/search_engines/prepopulated_engines.json (right): https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json#newcode33 components/search_engines/prepopulated_engines.json:33: "kCurrentDataVersion": 90 Yeah, this is some kind of bad ...
4 years, 6 months ago (2016-06-15 09:18:12 UTC) #88
Vitaly Baranov
On 2016/06/15 09:18:12, Peter Kasting wrote: > https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json > File components/search_engines/prepopulated_engines.json (right): > > https://codereview.chromium.org/1983773002/diff/480001/components/search_engines/prepopulated_engines.json#newcode33 ...
4 years, 6 months ago (2016-06-15 11:16:34 UTC) #89
Vitaly Baranov
4 years, 6 months ago (2016-06-15 11:18:28 UTC) #90
Message was sent while issue was closed.
On 2016/06/15 11:16:34, Vitaly Baranov wrote:
> On 2016/06/15 09:18:12, Peter Kasting wrote:
> >
>
https://codereview.chromium.org/1983773002/diff/480001/components/search_engi...
> > File components/search_engines/prepopulated_engines.json (right):
> > 
> >
>
https://codereview.chromium.org/1983773002/diff/480001/components/search_engi...
> > components/search_engines/prepopulated_engines.json:33:
"kCurrentDataVersion":
> > 90
> > Yeah, this is some kind of bad merge conflict resolution.  Please bump to
92.
> 
> Yeah, it was bad rebase. However why do you suggest bumping it to 92? The
final
> version of this CL doesn't make any changes in the database and this CL never
> changes the prepopulated engines themselves. Therefore I guess I should revert
> kCurrentDataVersion just to its original value, which is 91.

https://codereview.chromium.org/2065163008/

Powered by Google App Engine
This is Rietveld 408576698