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

Issue 882823004: Omnibox: BookmarksProvider: Make Multiple Prefix Matches Work (Closed)

Created:
5 years, 11 months ago by Mark P
Modified:
5 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, tfarina, noyau+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox: BookmarksProvider: Make Multiple Prefix Matches Work This code significantly simplies the logic for matching. Indeed, the old logic was buggy because multiple prefix matches could results in explosive growth of the list of matches (even if only one bookmark matches). Reviewer, I would avoid reading and trying to understand what CombineMatches() and the code that calls it is currently broken. See the second test case I added. Before this change, that test never terminates (in the time I waited) and explodes the machine's memory. Luckily this was rare; there are few reports on crbug. It's possible this new code is slower or faster than before (when the old code behaved correctly). I plan to look at the Omnibox.Providertime.Bookmarks numbers before and after this change. TBR=sky for owners stamp; review it if you feel like BUG=450850, 434604 Committed: https://crrev.com/02f304ba896632433d2e91b57c381cca90d4c7b9 Cr-Commit-Position: refs/heads/master@{#313574}

Patch Set 1 #

Total comments: 6

Patch Set 2 : cleanup #

Patch Set 3 : Peter's comments #

Patch Set 4 : restore android hack #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -138 lines) Patch
M components/bookmarks/browser/bookmark_index.h View 1 2 2 chunks +5 lines, -28 lines 0 comments Download
M components/bookmarks/browser/bookmark_index.cc View 1 2 3 7 chunks +26 lines, -108 lines 0 comments Download
M components/bookmarks/browser/bookmark_index_unittest.cc View 1 2 chunks +9 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
Mark P
Peter, please take a look. thanks, mark
5 years, 11 months ago (2015-01-28 00:08:13 UTC) #2
Peter Kasting
LGTM https://codereview.chromium.org/882823004/diff/1/components/bookmarks/browser/bookmark_index.cc File components/bookmarks/browser/bookmark_index.cc (right): https://codereview.chromium.org/882823004/diff/1/components/bookmarks/browser/bookmark_index.cc#newcode227 components/bookmarks/browser/bookmark_index.cc:227: CombineMatchesInPlace(i->second, matches); Is the efficiency gain of this ...
5 years, 11 months ago (2015-01-28 01:59:40 UTC) #3
Mark P
https://codereview.chromium.org/882823004/diff/1/components/bookmarks/browser/bookmark_index.cc File components/bookmarks/browser/bookmark_index.cc (right): https://codereview.chromium.org/882823004/diff/1/components/bookmarks/browser/bookmark_index.cc#newcode227 components/bookmarks/browser/bookmark_index.cc:227: CombineMatchesInPlace(i->second, matches); On 2015/01/28 01:59:40, Peter Kasting wrote: > ...
5 years, 10 months ago (2015-01-28 18:35:10 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/882823004/40001
5 years, 10 months ago (2015-01-28 18:37:54 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/36989)
5 years, 10 months ago (2015-01-28 18:46:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/882823004/60001
5 years, 10 months ago (2015-01-28 19:22:54 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-01-28 20:33:30 UTC) #11
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/02f304ba896632433d2e91b57c381cca90d4c7b9 Cr-Commit-Position: refs/heads/master@{#313574}
5 years, 10 months ago (2015-01-28 20:34:29 UTC) #12
Mark P
5 years, 7 months ago (2015-05-19 20:19:37 UTC) #13
Message was sent while issue was closed.
For the record, I check the UMA dashboard.  It seems this change
(which, recall, I made for correctness, not speed) did end up
slowing down BookmarkProvider a bit.  I couldn't see the impact
of the change on either the median response time or the geometric
mean of response times but I did see it on the arthimetic mean
graph and on the 99th percentile graph.  When this change launched,
it slowed BookmarkProvider down on (arithmetic mean) average by
0.1ms (which is about 15% because the provider is normally fast)
and the 99th percentile by 0.4ms (which is also about 15%).

This is not enough to concern me, especially as I see that often
our major version revisions (due to other changes) cause larger
movements in these metrics.

--mark

Powered by Google App Engine
This is Rietveld 408576698