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

Issue 1877833002: Optimize shortcuts provider (Closed)

Created:
4 years, 8 months ago by Alexander Yashkin
Modified:
4 years, 8 months ago
Reviewers:
Peter Kasting, Mark P
CC:
chromium-reviews, Mark P
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize shortcuts provider After tracing code in ShortcutsProvider I have come to conclusion that main source of slow work is usage and full initialization of AutocompleteMatch structure for every possible match candidate. Especially, when most of the matches are thrown away after deduplication and sort by relevance. I tried to implement an alternative solution by creating and using ShortcutMatch structure that contains only fields necessary to deduplication and relevance sort process. BUG=365932 R=pkasting@chromium.org, mpearson@chromium.org Committed: https://crrev.com/31940121e40746f5ca59496b857fc5de9cf403af Cr-Commit-Position: refs/heads/master@{#387820}

Patch Set 1 #

Patch Set 2 : Added new files #

Total comments: 22

Patch Set 3 : Fixes after review, round 1 #

Total comments: 20

Patch Set 4 : Fixes after review, round 2 #

Total comments: 40

Patch Set 5 : Fixes after review, round 3 #

Patch Set 6 : Reverted rename of ShortcutMatchToACMatch to ShortcutToACMatch #

Total comments: 4

Patch Set 7 : Apply git cl format to CL #

Patch Set 8 : Rebase on master and minor format fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -141 lines) Patch
M components/omnibox.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/omnibox/browser/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/omnibox/browser/autocomplete_match.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -4 lines 0 comments Download
M components/omnibox/browser/autocomplete_result.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -5 lines 0 comments Download
M components/omnibox/browser/autocomplete_result.cc View 1 2 3 4 5 6 7 4 chunks +23 lines, -104 lines 0 comments Download
M components/omnibox/browser/history_url_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
A components/omnibox/browser/match_compare.h View 1 2 3 4 5 6 1 chunk +67 lines, -0 lines 0 comments Download
M components/omnibox/browser/shortcuts_provider.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M components/omnibox/browser/shortcuts_provider.cc View 1 2 3 4 5 6 7 7 chunks +87 lines, -24 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
Alexander Yashkin
4 years, 8 months ago (2016-04-11 12:13:41 UTC) #1
Peter Kasting
Do you happen to know what was most slow about the AutocompleteMatch route? I ask ...
4 years, 8 months ago (2016-04-12 00:32:40 UTC) #2
Peter Kasting
https://codereview.chromium.org/1877833002/diff/20001/components/omnibox/browser/match_compare.h File components/omnibox/browser/match_compare.h (right): https://codereview.chromium.org/1877833002/diff/20001/components/omnibox/browser/match_compare.h#newcode24 components/omnibox/browser/match_compare.h:24: int GetDemotedRelevance(const Match& match) { Nit: Can be const ...
4 years, 8 months ago (2016-04-12 00:55:09 UTC) #3
Alexander Yashkin
On 2016/04/12 00:32:40, Peter Kasting wrote: > Do you happen to know what was most ...
4 years, 8 months ago (2016-04-12 07:21:35 UTC) #4
Alexander Yashkin
https://codereview.chromium.org/1877833002/diff/20001/components/omnibox/browser/match_compare.h File components/omnibox/browser/match_compare.h (right): https://codereview.chromium.org/1877833002/diff/20001/components/omnibox/browser/match_compare.h#newcode24 components/omnibox/browser/match_compare.h:24: int GetDemotedRelevance(const Match& match) { On 2016/04/12 00:55:08, Peter ...
4 years, 8 months ago (2016-04-12 09:09:21 UTC) #5
Peter Kasting
On 2016/04/12 07:21:35, a-v-y wrote: > On 2016/04/12 00:32:40, Peter Kasting wrote: > > Do ...
4 years, 8 months ago (2016-04-12 18:58:59 UTC) #6
Peter Kasting
https://codereview.chromium.org/1877833002/diff/40001/components/omnibox/browser/shortcut_match.cc File components/omnibox/browser/shortcut_match.cc (right): https://codereview.chromium.org/1877833002/diff/40001/components/omnibox/browser/shortcut_match.cc#newcode24 components/omnibox/browser/shortcut_match.cc:24: return elem1.stripped_destination_url == elem2.stripped_destination_url; Nit: Simpler: return (elem1.stripped_destination_url == ...
4 years, 8 months ago (2016-04-12 23:29:51 UTC) #7
Alexander Yashkin
https://codereview.chromium.org/1877833002/diff/40001/components/omnibox/browser/shortcut_match.cc File components/omnibox/browser/shortcut_match.cc (right): https://codereview.chromium.org/1877833002/diff/40001/components/omnibox/browser/shortcut_match.cc#newcode24 components/omnibox/browser/shortcut_match.cc:24: return elem1.stripped_destination_url == elem2.stripped_destination_url; On 2016/04/12 23:29:50, Peter Kasting ...
4 years, 8 months ago (2016-04-13 09:29:36 UTC) #8
Peter Kasting
https://codereview.chromium.org/1877833002/diff/60001/components/omnibox/browser/autocomplete_result.cc File components/omnibox/browser/autocomplete_result.cc (right): https://codereview.chromium.org/1877833002/diff/60001/components/omnibox/browser/autocomplete_result.cc#newcode24 components/omnibox/browser/autocomplete_result.cc:24: using metrics::OmniboxEventProto; Nit: You can remove this now and ...
4 years, 8 months ago (2016-04-14 23:52:34 UTC) #9
Alexander Yashkin
https://codereview.chromium.org/1877833002/diff/60001/components/omnibox/browser/autocomplete_result.cc File components/omnibox/browser/autocomplete_result.cc (right): https://codereview.chromium.org/1877833002/diff/60001/components/omnibox/browser/autocomplete_result.cc#newcode24 components/omnibox/browser/autocomplete_result.cc:24: using metrics::OmniboxEventProto; On 2016/04/14 23:52:33, Peter Kasting wrote: > ...
4 years, 8 months ago (2016-04-15 09:14:15 UTC) #10
Mark P
I'm moving myself to the CC list for this changelist. I'm sure pkasting@'s detailed review ...
4 years, 8 months ago (2016-04-15 17:17:05 UTC) #11
Peter Kasting
LGTM https://codereview.chromium.org/1877833002/diff/100001/components/omnibox/browser/match_compare.h File components/omnibox/browser/match_compare.h (right): https://codereview.chromium.org/1877833002/diff/100001/components/omnibox/browser/match_compare.h#newcode38 components/omnibox/browser/match_compare.h:38: (demoted_relevance1 > demoted_relevance2); Not sure this indentation is ...
4 years, 8 months ago (2016-04-15 20:23:45 UTC) #12
Alexander Yashkin
https://codereview.chromium.org/1877833002/diff/100001/components/omnibox/browser/match_compare.h File components/omnibox/browser/match_compare.h (right): https://codereview.chromium.org/1877833002/diff/100001/components/omnibox/browser/match_compare.h#newcode38 components/omnibox/browser/match_compare.h:38: (demoted_relevance1 > demoted_relevance2); On 2016/04/15 20:23:44, Peter Kasting wrote: ...
4 years, 8 months ago (2016-04-16 05:18:17 UTC) #13
Alexander Yashkin
On 2016/04/15 20:23:45, Peter Kasting wrote: > LGTM > > https://codereview.chromium.org/1877833002/diff/100001/components/omnibox/browser/match_compare.h > File components/omnibox/browser/match_compare.h (right): ...
4 years, 8 months ago (2016-04-16 05:20:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1877833002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1877833002/120001
4 years, 8 months ago (2016-04-16 05:23:22 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/20289) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-16 05:25:22 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1877833002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1877833002/140001
4 years, 8 months ago (2016-04-16 11:59:49 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-16 23:19:27 UTC) #23
commit-bot: I haz the power
4 years, 8 months ago (2016-04-16 23:21:12 UTC) #25
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/31940121e40746f5ca59496b857fc5de9cf403af
Cr-Commit-Position: refs/heads/master@{#387820}

Powered by Google App Engine
This is Rietveld 408576698