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

Issue 197183002: Reduce footprint of registry controlled domain table (Closed)

Created:
6 years, 9 months ago by Olle Liljenzin
Modified:
6 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Randy Smith (Not in Mondays)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reduce footprint of registry controlled domain table The perfect hash table containing all registry controlled domains is replaced by a compact graph (a dafsa) to reduce binary size and PSS of the running process. Size of the new structure is about 33kB compared to 380kB for the perfect hash table. BUG=

Patch Set 1 #

Total comments: 11

Patch Set 2 : Implemented changes suggested in review. #

Patch Set 3 : Added bounds checks #

Total comments: 47

Patch Set 4 : Fixed style issues and added unit tests for make_dafsa.py #

Total comments: 25

Patch Set 5 : Fixed some doc strings #

Total comments: 8

Patch Set 6 : Fixed more style issues and doc strings #

Total comments: 14

Patch Set 7 : Implemented requested changes #

Total comments: 4

Patch Set 8 : Removed shebang and execution bits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2201 lines, -459 lines) Patch
D net/base/registry_controlled_domains/effective_tld_names_unittest1.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -218 lines 0 comments Download
D net/base/registry_controlled_domains/effective_tld_names_unittest2.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -161 lines 0 comments Download
A net/base/registry_controlled_domains/effective_tld_names_unittest3.gperf View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
A net/base/registry_controlled_domains/effective_tld_names_unittest4.gperf View 1 2 3 4 5 6 7 1 chunk +523 lines, -0 lines 0 comments Download
A net/base/registry_controlled_domains/effective_tld_names_unittest5.gperf View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
A net/base/registry_controlled_domains/effective_tld_names_unittest6.gperf View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M net/base/registry_controlled_domains/registry_controlled_domain.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download
M net/base/registry_controlled_domains/registry_controlled_domain.cc View 1 2 3 4 5 6 7 3 chunks +175 lines, -50 lines 0 comments Download
M net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc View 1 2 3 4 5 6 7 7 chunks +166 lines, -18 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 3 chunks +38 lines, -0 lines 0 comments Download
A net/tools/tld_cleanup/PRESUBMIT.py View 1 2 3 4 5 6 7 1 chunk +32 lines, -0 lines 0 comments Download
M net/tools/tld_cleanup/README View 1 2 3 4 5 6 7 1 chunk +5 lines, -8 lines 0 comments Download
A net/tools/tld_cleanup/make_dafsa.py View 1 2 3 4 5 6 7 1 chunk +469 lines, -0 lines 0 comments Download
A net/tools/tld_cleanup/make_dafsa_unittest.py View 1 2 3 4 5 6 7 1 chunk +757 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
Olle Liljenzin
The CQ bit was checked by ollel@opera.com
6 years, 9 months ago (2014-03-12 12:23:18 UTC) #1
Olle Liljenzin
The CQ bit was unchecked by ollel@opera.com
6 years, 9 months ago (2014-03-12 12:23:18 UTC) #2
Olle Liljenzin
Could you please review my patch.
6 years, 9 months ago (2014-03-12 12:31:44 UTC) #3
Pam (message me for reviews)
Do you have any performance data for this change? Some callers turn out to be ...
6 years, 9 months ago (2014-03-12 23:46:32 UTC) #4
Olle Liljenzin
On 2014/03/12 23:46:32, Pam (also PM for reviews) wrote: > Do you have any performance ...
6 years, 9 months ago (2014-03-13 12:31:15 UTC) #5
Olle Liljenzin
On 2014/03/13 12:31:15, ollel wrote: > 0.8-0.9 us for all calls and using the dafsa ...
6 years, 9 months ago (2014-03-13 12:34:49 UTC) #6
Olle Liljenzin
On 2014/03/13 12:31:15, ollel wrote: > 560 calls to GetDomainAndRegistry() and 220 calls to GetDomainAndRegistry() ...
6 years, 9 months ago (2014-03-13 12:38:54 UTC) #7
Randy Smith (Not in Mondays)
I don't know this code. Ryan, can you assist?
6 years, 9 months ago (2014-03-14 19:24:06 UTC) #8
Ryan Sleevi
OK, just to ack this review, it's definitely going to take me time to parse, ...
6 years, 9 months ago (2014-03-18 01:23:57 UTC) #9
cbentzel
On 2014/03/18 01:23:57, Ryan Sleevi wrote: > OK, just to ack this review, it's definitely ...
6 years, 9 months ago (2014-03-18 01:45:18 UTC) #10
Olle Liljenzin
On 2014/03/18 01:23:57, Ryan Sleevi wrote: > My advice: Populate a cookie database with 3K+ ...
6 years, 9 months ago (2014-03-18 15:35:43 UTC) #11
Ryan Sleevi
I realize I omitted one key detail: the device to test on. On Desktop, the ...
6 years, 9 months ago (2014-03-18 15:41:45 UTC) #12
Ryan Sleevi
https://codereview.chromium.org/197183002/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/197183002/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode66 net/base/registry_controlled_domains/registry_controlled_domain.cc:66: int LookupString(const unsigned char* pos, const char* key, int ...
6 years, 9 months ago (2014-03-19 03:08:31 UTC) #13
Daniel Bratell
We're already using this code in Opera and I reviewed this patch before it landed ...
6 years, 9 months ago (2014-03-19 12:20:33 UTC) #14
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/197183002/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode72 net/base/registry_controlled_domains/registry_controlled_domain.cc:72: bool is_last = (*pos & 0x80) != 0; Iterators ...
6 years, 9 months ago (2014-03-19 14:19:41 UTC) #15
Ryan Sleevi
It is absolutely possible to make this code more readable. I'm aware of the performance ...
6 years, 9 months ago (2014-03-19 15:05:17 UTC) #16
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/1/net/net.gyp File net/net.gyp (right): https://codereview.chromium.org/197183002/diff/1/net/net.gyp#newcode76 net/net.gyp:76: }, On 2014/03/19 03:08:32, Ryan Sleevi wrote: > Let's ...
6 years, 9 months ago (2014-03-21 09:36:41 UTC) #17
Olle Liljenzin
Ryan, No one would be more happy than me if I could make the code ...
6 years, 9 months ago (2014-03-27 16:14:58 UTC) #18
Ryan Sleevi
I'll follow-up offline with a suggested rewrite, which also makes sure that I've fundamentally understood ...
6 years, 9 months ago (2014-03-27 20:23:01 UTC) #19
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/1/net/net.gyp File net/net.gyp (right): https://codereview.chromium.org/197183002/diff/1/net/net.gyp#newcode76 net/net.gyp:76: }, When I put the rule inside the net ...
6 years, 9 months ago (2014-03-28 12:51:22 UTC) #20
bmcquade1
Just an FYI that an implementation very similar to this already exists as a third ...
6 years, 9 months ago (2014-03-28 15:05:59 UTC) #21
bmcquade1
Also, I'm happy to give contributor rights to anyone that wants to contribute to the ...
6 years, 9 months ago (2014-03-28 15:24:10 UTC) #22
Olle Liljenzin
bmcquade1, I tried to build the linked program with a fresh domain table, but it ...
6 years, 9 months ago (2014-03-28 16:07:29 UTC) #23
bmcquade1
Hi Ollie, You're right, the project hasn't been updated in a while, and the increased ...
6 years, 9 months ago (2014-03-28 16:47:27 UTC) #24
Ryan Sleevi
I don't think domain-registry-provider is currently in a good state right now (doesn't handle the ...
6 years, 9 months ago (2014-03-29 02:14:28 UTC) #25
Ryan Sleevi
Olle: Apologies for the delay, I spent the last week out sick. I've attempted to ...
6 years, 8 months ago (2014-04-07 17:59:56 UTC) #26
Olle Liljenzin
Ryan, Suddenly the code looks much better. :-) I will try to complete your code ...
6 years, 8 months ago (2014-04-08 08:48:22 UTC) #27
Ryan Sleevi
On Apr 8, 2014 1:48 AM, <ollel@opera.com> wrote: > > Ryan, > > Suddenly the ...
6 years, 8 months ago (2014-04-08 14:35:32 UTC) #28
Olle Liljenzin
I just don't see the point in doing the check if we can verify that ...
6 years, 8 months ago (2014-04-09 12:49:27 UTC) #29
Ryan Sleevi
On 2014/04/09 12:49:27, Olle Liljenzin wrote: > I just don't see the point in doing ...
6 years, 8 months ago (2014-04-09 20:06:06 UTC) #30
Olle Liljenzin
Ryan: Sorry for taking so long, but I had to do some other work between. ...
6 years, 8 months ago (2014-04-22 14:38:02 UTC) #31
Ryan Sleevi
Hi Olle, I think we're approaching the final stretches of the .cc side, and the ...
6 years, 8 months ago (2014-04-23 01:52:17 UTC) #32
M-A Ruel
FTR, the space saving looks nice. I just want to make sure the python script ...
6 years, 8 months ago (2014-04-23 12:26:17 UTC) #33
Pam (message me for reviews)
https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py File net/tools/tld_cleanup/make_dafsa.py (right): https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py#newcode1 net/tools/tld_cleanup/make_dafsa.py:1: #!/usr/bin/python On 2014/04/23 12:26:18, M-A Ruel wrote: > Please ...
6 years, 8 months ago (2014-04-23 13:13:56 UTC) #34
Olle Liljenzin
On 2014/04/23 13:13:56, Pam (also PM for reviews) wrote: > Python coding style is described ...
6 years, 8 months ago (2014-04-23 15:00:01 UTC) #35
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/197183002/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode71 net/base/registry_controlled_domains/registry_controlled_domain.cc:71: const unsigned char*& offset) { On 2014/04/23 01:52:18, Ryan ...
6 years, 8 months ago (2014-04-24 09:29:59 UTC) #36
M-A Ruel
Did you forget to upload? https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py File net/tools/tld_cleanup/make_dafsa.py (right): https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py#newcode14 net/tools/tld_cleanup/make_dafsa.py:14: The input strings are ...
6 years, 8 months ago (2014-04-24 12:45:18 UTC) #37
M-A Ruel
FTR, implementing a python decoder would go a long way to document the format and ...
6 years, 8 months ago (2014-04-24 12:52:41 UTC) #38
Olle Liljenzin
On 2014/04/24 12:45:18, M-A Ruel wrote: > Did you forget to upload? I was just ...
6 years, 8 months ago (2014-04-24 12:54:25 UTC) #39
M-A Ruel
On 2014/04/24 12:54:25, Olle Liljenzin wrote: > On 2014/04/24 12:45:18, M-A Ruel wrote: > > ...
6 years, 8 months ago (2014-04-24 13:00:16 UTC) #40
Olle Liljenzin
On 2014/04/24 12:52:41, M-A Ruel wrote: > FTR, implementing a python decoder would go a ...
6 years, 8 months ago (2014-04-24 13:28:38 UTC) #41
M-A Ruel
On 2014/04/24 13:28:38, Olle Liljenzin wrote: > On 2014/04/24 12:52:41, M-A Ruel wrote: > > ...
6 years, 8 months ago (2014-04-25 00:25:52 UTC) #42
Olle Liljenzin
Fixed style issues and added unit tests for make_dafsa.py. https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py File net/tools/tld_cleanup/make_dafsa.py (right): https://codereview.chromium.org/197183002/diff/20001/net/tools/tld_cleanup/make_dafsa.py#newcode14 net/tools/tld_cleanup/make_dafsa.py:14: ...
6 years, 7 months ago (2014-04-29 12:41:52 UTC) #43
M-A Ruel
lgtm with a few changes and others optional. https://codereview.chromium.org/197183002/diff/30001/net/tools/tld_cleanup/make_dafsa.py File net/tools/tld_cleanup/make_dafsa.py (right): https://codereview.chromium.org/197183002/diff/30001/net/tools/tld_cleanup/make_dafsa.py#newcode2 net/tools/tld_cleanup/make_dafsa.py:2: Remove ...
6 years, 7 months ago (2014-04-29 21:12:57 UTC) #44
Ryan Sleevi
This LGTM as well. Note that I suspect I will need to manually land this, ...
6 years, 7 months ago (2014-04-29 21:20:46 UTC) #45
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/30001/net/tools/tld_cleanup/make_dafsa.py File net/tools/tld_cleanup/make_dafsa.py (right): https://codereview.chromium.org/197183002/diff/30001/net/tools/tld_cleanup/make_dafsa.py#newcode201 net/tools/tld_cleanup/make_dafsa.py:201: self.msg = msg On 2014/04/29 21:12:58, M-A Ruel wrote: ...
6 years, 7 months ago (2014-04-30 11:43:42 UTC) #46
M-A Ruel
https://codereview.chromium.org/197183002/diff/50001/net/tools/tld_cleanup/PRESUBMIT.py File net/tools/tld_cleanup/PRESUBMIT.py (right): https://codereview.chromium.org/197183002/diff/50001/net/tools/tld_cleanup/PRESUBMIT.py#newcode2 net/tools/tld_cleanup/PRESUBMIT.py:2: I meant to remove the empty line, it's not ...
6 years, 7 months ago (2014-05-02 16:53:01 UTC) #47
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/50001/net/tools/tld_cleanup/PRESUBMIT.py File net/tools/tld_cleanup/PRESUBMIT.py (right): https://codereview.chromium.org/197183002/diff/50001/net/tools/tld_cleanup/PRESUBMIT.py#newcode2 net/tools/tld_cleanup/PRESUBMIT.py:2: On 2014/05/02 16:53:02, M-A Ruel wrote: > I meant ...
6 years, 7 months ago (2014-05-05 08:41:39 UTC) #48
M-A Ruel
python lgtm with 3 nits https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py File net/tools/tld_cleanup/PRESUBMIT.py (right): https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py#newcode1 net/tools/tld_cleanup/PRESUBMIT.py:1: #!/usr/bin/env python Technically, this ...
6 years, 7 months ago (2014-05-05 16:54:50 UTC) #49
Olle Liljenzin
https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py File net/tools/tld_cleanup/PRESUBMIT.py (right): https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py#newcode1 net/tools/tld_cleanup/PRESUBMIT.py:1: #!/usr/bin/env python On 2014/05/05 16:54:51, M-A Ruel wrote: > ...
6 years, 7 months ago (2014-05-05 17:32:04 UTC) #50
Ryan Sleevi
On 2014/05/05 17:32:04, Olle Liljenzin wrote: > https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py > File net/tools/tld_cleanup/PRESUBMIT.py (right): > > https://codereview.chromium.org/197183002/diff/60001/net/tools/tld_cleanup/PRESUBMIT.py#newcode1 ...
6 years, 7 months ago (2014-05-06 23:08:17 UTC) #51
M-A Ruel
6 years, 7 months ago (2014-05-13 12:38:34 UTC) #52
Oh and thanks for bearing with me. :)

Powered by Google App Engine
This is Rietveld 408576698