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

Issue 2690303012: Cleaning up url_index_private_data and in_memory_url_index_types. (Closed)

Created:
3 years, 10 months ago by dyaroshev
Modified:
3 years, 9 months ago
CC:
Alexander Yashkin, chromium-reviews, jdonnelly+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleaning up before switching to flat sets in HQP. BUG=693225 Review-Url: https://codereview.chromium.org/2690303012 Cr-Commit-Position: refs/heads/master@{#453269} Committed: https://chromium.googlesource.com/chromium/src/+/950ccead606c70df01cb13625fdb2da24729345d

Patch Set 1 : Rough sketch. #

Total comments: 37

Patch Set 2 : Review, round 1. #

Total comments: 21

Patch Set 3 : Removing sorting, utilitiy for sets intersection. #

Total comments: 32

Patch Set 4 : Review, round 2. #

Patch Set 5 : Review, round 3. #

Total comments: 24

Patch Set 6 : Review, round 4. #

Total comments: 8

Patch Set 7 : Compilation issues with old standard library. #

Patch Set 8 : Dropping noexcept from move operations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -327 lines) Patch
M components/omnibox/browser/in_memory_url_index_types.h View 1 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M components/omnibox/browser/in_memory_url_index_types.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -18 lines 0 comments Download
M components/omnibox/browser/in_memory_url_index_unittest.cc View 1 2 3 4 5 2 chunks +4 lines, -5 lines 0 comments Download
M components/omnibox/browser/scored_history_match.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M components/omnibox/browser/scored_history_match.cc View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M components/omnibox/browser/url_index_private_data.h View 1 2 3 4 5 6 chunks +15 lines, -23 lines 0 comments Download
M components/omnibox/browser/url_index_private_data.cc View 1 2 3 4 5 6 25 chunks +189 lines, -278 lines 0 comments Download

Messages

Total messages: 55 (14 generated)
dyaroshev
@pkasting, @mpearson. Hi. So, there are more changes in this CL than just switching to ...
3 years, 10 months ago (2017-02-16 22:58:31 UTC) #3
Peter Kasting
I really like this cleanup. It makes the code simpler and better. Thank you for ...
3 years, 10 months ago (2017-02-17 01:33:47 UTC) #4
dyaroshev
https://codereview.chromium.org/2690303012/diff/1/components/omnibox/browser/in_memory_url_index_types.cc File components/omnibox/browser/in_memory_url_index_types.cc (right): https://codereview.chromium.org/2690303012/diff/1/components/omnibox/browser/in_memory_url_index_types.cc#newcode101 components/omnibox/browser/in_memory_url_index_types.cc:101: std::make_move_iterator(words.end())}; On 2017/02/17 01:33:45, Peter Kasting wrote: > This ...
3 years, 10 months ago (2017-02-17 20:17:23 UTC) #6
dyaroshev
@pkasting Not in this patch, but I wondered how would you feel about small algorithmic ...
3 years, 10 months ago (2017-02-17 20:44:38 UTC) #7
dyaroshev
On 2017/02/17 20:44:38, dyaroshev wrote: > // > set_intersection(first, last) - intersects a range of ...
3 years, 10 months ago (2017-02-17 20:47:52 UTC) #8
Peter Kasting
On 2017/02/17 20:44:38, dyaroshev wrote: > @pkasting > > Not in this patch, but I ...
3 years, 10 months ago (2017-02-17 21:44:10 UTC) #9
Peter Kasting
https://codereview.chromium.org/2690303012/diff/1/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/1/components/omnibox/browser/url_index_private_data.cc#newcode218 components/omnibox/browser/url_index_private_data.cc:218: std::nth_element(history_ids.begin(), On 2017/02/17 20:17:22, dyaroshev wrote: > On 2017/02/17 ...
3 years, 10 months ago (2017-02-17 21:52:27 UTC) #10
dyaroshev
On 2017/02/17 21:44:10, Peter Kasting wrote: > On 2017/02/17 20:44:38, dyaroshev wrote: > > @pkasting ...
3 years, 10 months ago (2017-02-17 23:17:46 UTC) #11
Peter Kasting
On 2017/02/17 23:17:46, dyaroshev wrote: > On 2017/02/17 21:44:10, Peter Kasting wrote: > > On ...
3 years, 10 months ago (2017-02-17 23:33:57 UTC) #12
Peter Kasting
https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc#newcode595 components/omnibox/browser/url_index_private_data.cc:595: for (WordIDSet::iterator word_set_iter = word_id_set.begin(); How come you ended ...
3 years, 10 months ago (2017-02-18 00:40:40 UTC) #13
dyaroshev
https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc#newcode595 components/omnibox/browser/url_index_private_data.cc:595: for (WordIDSet::iterator word_set_iter = word_id_set.begin(); On 2017/02/18 00:40:40, Peter ...
3 years, 10 months ago (2017-02-18 00:57:36 UTC) #14
dyaroshev
On 2017/02/17 23:33:57, Peter Kasting wrote: > > Committing an entirely new container took a ...
3 years, 10 months ago (2017-02-18 01:00:14 UTC) #15
dyaroshev
On 2017/02/18 01:00:14, dyaroshev wrote: > On 2017/02/17 23:33:57, Peter Kasting wrote: > > Again, ...
3 years, 10 months ago (2017-02-18 01:14:02 UTC) #16
dyaroshev
https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode90 components/omnibox/browser/url_index_private_data.cc:90: ResultingSet res(tmp_set.begin(), tmp_set.end()); If we keep this, I should ...
3 years, 10 months ago (2017-02-18 01:22:15 UTC) #17
Peter Kasting
https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc#newcode595 components/omnibox/browser/url_index_private_data.cc:595: for (WordIDSet::iterator word_set_iter = word_id_set.begin(); On 2017/02/18 00:57:36, dyaroshev ...
3 years, 10 months ago (2017-02-18 01:46:32 UTC) #18
dyaroshev
https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode82 components/omnibox/browser/url_index_private_data.cc:82: template <typename ResultingSet, typename I, typename Transformation> On 2017/02/18 ...
3 years, 10 months ago (2017-02-18 11:48:14 UTC) #19
dyaroshev
On 2017/02/18 01:46:32, Peter Kasting wrote: > > Seems like the issue is that std::set ...
3 years, 10 months ago (2017-02-18 12:48:58 UTC) #20
dyaroshev
On 2017/02/18 01:46:32, Peter Kasting wrote: > https://codereview.chromium.org/2690303012/diff/20001/components/omnibox/browser/url_index_private_data.cc#newcode607 > components/omnibox/browser/url_index_private_data.cc:607: // the sets from each ...
3 years, 10 months ago (2017-02-19 22:31:12 UTC) #21
Peter Kasting
Please try to send replies inline on the original comments, it makes it harder to ...
3 years, 10 months ago (2017-02-20 10:02:54 UTC) #22
dyaroshev
On 2017/02/20 10:02:54, Peter Kasting wrote: > Please try to send replies inline on the ...
3 years, 10 months ago (2017-02-20 11:31:35 UTC) #23
dyaroshev
https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode234 components/omnibox/browser/url_index_private_data.cc:234: post_filter_item_count_ += history_ids.size(); On 2017/02/20 10:02:54, Peter Kasting wrote: ...
3 years, 10 months ago (2017-02-20 22:21:32 UTC) #24
Alexander Yashkin
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode104 components/omnibox/browser/url_index_private_data.cc:104: ContainerTo ContinerCast(ContainerFrom&& cont) { ContainerCast? https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode118 components/omnibox/browser/url_index_private_data.cc:118: // Creates ...
3 years, 10 months ago (2017-02-21 07:07:15 UTC) #25
dyaroshev
On 2017/02/21 07:07:15, Alexander Yashkin wrote: https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode118 > components/omnibox/browser/url_index_private_data.cc:118: // Creates a new set > ...
3 years, 10 months ago (2017-02-21 08:20:20 UTC) #26
dyaroshev
https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode234 components/omnibox/browser/url_index_private_data.cc:234: post_filter_item_count_ += history_ids.size(); On 2017/02/20 22:21:31, dyaroshev wrote: > ...
3 years, 10 months ago (2017-02-22 22:57:25 UTC) #27
dyaroshev
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode118 components/omnibox/browser/url_index_private_data.cc:118: // Creates a new set by intersecting all the ...
3 years, 10 months ago (2017-02-23 00:45:54 UTC) #28
Peter Kasting
I will try to get to this tomorrow.
3 years, 10 months ago (2017-02-23 02:07:07 UTC) #29
dyaroshev
On 2017/02/23 02:07:07, Peter Kasting wrote: > I will try to get to this tomorrow. ...
3 years, 10 months ago (2017-02-23 21:30:10 UTC) #30
Mark P
Only scanned this long thread; saw one thing that clearly asked for my opinion. Replied ...
3 years, 10 months ago (2017-02-24 00:34:16 UTC) #32
Peter Kasting
LGTM. I'd still rather kill ContainerCast (see below), but I've taken the debate as far ...
3 years, 10 months ago (2017-02-25 04:54:42 UTC) #33
dyaroshev
@pkasting The changes seem to be big enough that I would appreciate if you confirmed ...
3 years, 10 months ago (2017-02-26 01:12:17 UTC) #34
Peter Kasting
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode681 components/omnibox/browser/url_index_private_data.cc:681: auto GetSet = [&](base::char16 c) -> const WordIDSet& { ...
3 years, 10 months ago (2017-02-26 01:35:18 UTC) #35
dyaroshev
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/browser/url_index_private_data.cc#newcode681 components/omnibox/browser/url_index_private_data.cc:681: auto GetSet = [&](base::char16 c) -> const WordIDSet& { ...
3 years, 10 months ago (2017-02-26 01:39:16 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690303012/100001
3 years, 9 months ago (2017-02-26 17:03:50 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/218930)
3 years, 9 months ago (2017-02-26 17:14:40 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690303012/120001
3 years, 9 months ago (2017-02-26 18:09:24 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/218931)
3 years, 9 months ago (2017-02-26 18:24:32 UTC) #46
dyaroshev
On 2017/02/26 18:24:32, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 9 months ago (2017-02-27 17:39:26 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690303012/140001
3 years, 9 months ago (2017-02-27 17:39:53 UTC) #50
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/950ccead606c70df01cb13625fdb2da24729345d
3 years, 9 months ago (2017-02-27 18:38:08 UTC) #53
Peter Kasting
LGTM Most of the comments below ended up being about the original code you restored, ...
3 years, 9 months ago (2017-02-28 00:33:55 UTC) #54
dyaroshev
3 years, 9 months ago (2017-02-28 09:47:37 UTC) #55
Message was sent while issue was closed.
On 2017/02/28 00:33:55, Peter Kasting wrote:
> LGTM
> 
> Most of the comments below ended up being about the original code you
restored,
> which I only reviewed because it was a diff from the previous patch set. 
> They're all optional, you're welcome to do them in some following patch if you
> think they're a win, or ignore them.
> 
>
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/brow...
> File components/omnibox/browser/url_index_private_data.cc (right):
> 
>
https://codereview.chromium.org/2690303012/diff/80001/components/omnibox/brow...
> components/omnibox/browser/url_index_private_data.cc:128: auto res =
> ContinerCast<ResultingSet>(get_set(*first));
> On 2017/02/26 01:12:16, dyaroshev wrote:
> > On 2017/02/25 04:54:42, Peter Kasting wrote:
> > > It seems like the main reason you need ContainerCast is because one of the
> > > callers is trying to supply a vector type for ResultingSet.
> > > 
> > > This sort of makes the type names and comments of this function a lie. 
They
> > > shouldn't explicitly say "set" if this is really just about working on
> > arbitrary
> > > containers.
> > > 
> > > But the other fix would be to intersect to a set, and then pull a vector
out
> > of
> > > that at the end to return from the caller that wants to do so.  This would
> > allow
> > > removing all the ContainerCast stuff, which still seems like a desirable
> goal
> > to
> > > me in terms of lowering boilerplate and improving readability.  It's not
> > > instantly obvious how it would affect efficiency, but it seems like it
would
> > > lower it slightly (but maybe not enough to matter).
> > 
> > Since this is the cleaning up patch and I don't see a 100% satisfying
solution
> -
> > I've reverted the intersect patch, created a task for writing a generic
> > union/intersect functions and added a todo. Is this ok?
> 
> It's fine.
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> File components/omnibox/browser/url_index_private_data.cc (right):
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:486: base::string16
> uni_word = *iter;
> Nit: Inline into next statement.
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:489: history_ids.clear();
> Nit: Just "return HistoryIDVector();" rather than clear() + break; + return. 
> (here, plus two similar places below)
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:632: word_id_set.clear();
> Nit: Same comment as above
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:635: WordIDSet&
> char_word_id_set(char_iter->second);
> Nit: Can be const
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:644: // First character
> results becomes base set of results.
> Nit: These comments just restate the code, remove.
> 
>
https://codereview.chromium.org/2690303012/diff/100001/components/omnibox/bro...
> components/omnibox/browser/url_index_private_data.cc:712: if
> (new_scored_match.raw_score != 0)
> Nit: > 0?

Sorry that I merged without waiting - I thought that since we have another patch
to go - I'll do your suggestions there.

Powered by Google App Engine
This is Rietveld 408576698