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

Issue 2797133006: [subresource_filter] Index activation rules separately. (Closed)

Created:
3 years, 8 months ago by pkalinnikov
Modified:
3 years, 8 months ago
CC:
chromium-reviews, subresource-filter-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[subresource_filter] Index activation rules separately. This CL adds a separate index for activation rules. This drastically increases speed of IndexedRuleset::ShouldDisableFilteringForDocument, because currently there are only about 20 rules with activation options, as opposed to tens of thousands URL rules total in the ruleset. Ultimately, this change makes computing activation states for subdocuments very fast. Memory footprint added by the new index is less than a kilobyte. BUG=708458 Review-Url: https://codereview.chromium.org/2797133006 Cr-Commit-Position: refs/heads/master@{#462825} Committed: https://chromium.googlesource.com/chromium/src/+/986188a907c91d38938e24604f7b4397fdaaff75

Patch Set 1 #

Patch Set 2 : Clean up. #

Patch Set 3 : Make Windows builder happy. #

Total comments: 5

Patch Set 4 : Add unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -37 lines) Patch
M components/subresource_filter/core/common/flat/rules.fbs View 1 chunk +4 lines, -1 line 0 comments Download
M components/subresource_filter/core/common/indexed_ruleset.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/subresource_filter/core/common/indexed_ruleset.cc View 1 2 5 chunks +26 lines, -15 lines 0 comments Download
M components/subresource_filter/core/common/indexed_ruleset_unittest.cc View 1 2 3 13 chunks +36 lines, -21 lines 0 comments Download

Messages

Total messages: 27 (18 generated)
pkalinnikov
PTAL.
3 years, 8 months ago (2017-04-06 11:49:59 UTC) #3
pkalinnikov
Note: "indexed_ruleset_unittest.cc" already covers this change in the OneRuleWithActivationTypes test.
3 years, 8 months ago (2017-04-06 12:58:53 UTC) #10
engedy
Looks great, LGTM % minor comments. I find it amazing that a conceptually simple -- ...
3 years, 8 months ago (2017-04-06 14:21:30 UTC) #13
pkalinnikov
Thanks! Balazs, one question for you. https://codereview.chromium.org/2797133006/diff/40001/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2797133006/diff/40001/components/subresource_filter/core/common/indexed_ruleset.cc#newcode221 components/subresource_filter/core/common/indexed_ruleset.cc:221: auto add_rule_to_index = ...
3 years, 8 months ago (2017-04-07 09:06:48 UTC) #14
engedy
https://codereview.chromium.org/2797133006/diff/40001/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2797133006/diff/40001/components/subresource_filter/core/common/indexed_ruleset.cc#newcode221 components/subresource_filter/core/common/indexed_ruleset.cc:221: auto add_rule_to_index = [&rule, rule_offset](MutableUrlPatternIndex* index) { On 2017/04/07 ...
3 years, 8 months ago (2017-04-07 09:21:43 UTC) #17
engedy
3 years, 8 months ago (2017-04-07 09:21:44 UTC) #18
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/2797133006/60001
3 years, 8 months ago (2017-04-07 10:00:38 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/986188a907c91d38938e24604f7b4397fdaaff75
3 years, 8 months ago (2017-04-07 10:05:30 UTC) #26
Charlie Harrison
3 years, 8 months ago (2017-04-07 12:09:57 UTC) #27
Message was sent while issue was closed.
lgtm/2

Powered by Google App Engine
This is Rietveld 408576698