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

Issue 2801303002: [subresource_filter] Check request flags before URL pattern. (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] Check request flags before URL pattern. This CL makes IndexedRuleset's request matching 30% faster by putting the rule flags check before the URL pattern matching. Most of the candidate rules have non-matching flags, like ElementType, and matching the flags is cheaper than that of a URL pattern. BUG=708458 Review-Url: https://codereview.chromium.org/2801303002 Cr-Commit-Position: refs/heads/master@{#463231} Committed: https://chromium.googlesource.com/chromium/src/+/e64c5d36227046633521b638ffc2f0b9a903590f

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -55 lines) Patch
M components/subresource_filter/core/common/indexed_ruleset.cc View 1 8 chunks +35 lines, -31 lines 0 comments Download
M components/subresource_filter/core/common/indexed_ruleset_unittest.cc View 1 11 chunks +28 lines, -24 lines 0 comments Download

Messages

Total messages: 31 (18 generated)
pkalinnikov
PTAL. https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode408 components/subresource_filter/core/common/indexed_ruleset.cc:408: const url::Origin& parent_origin, nit: parent_document_origin
3 years, 8 months ago (2017-04-07 14:04:55 UTC) #7
engedy
Great optimization! LGTM % nits. https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode374 components/subresource_filter/core/common/indexed_ruleset.cc:374: // Returns whether a ...
3 years, 8 months ago (2017-04-07 14:24:56 UTC) #13
Charlie Harrison
Will try to take a look at this soon. Very busy with meetings today/yesterday. https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc ...
3 years, 8 months ago (2017-04-07 14:33:27 UTC) #14
Charlie Harrison
Will try to take a look at this soon. Very busy with meetings today/yesterday.
3 years, 8 months ago (2017-04-07 14:33:28 UTC) #15
pkalinnikov
https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode377 components/subresource_filter/core/common/indexed_ruleset.cc:377: // parent document. On 2017/04/07 14:33:27, Charlie Harrison wrote: ...
3 years, 8 months ago (2017-04-07 15:55:17 UTC) #16
engedy
On 2017/04/07 15:55:17, pkalinnikov wrote: > https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc > File components/subresource_filter/core/common/indexed_ruleset.cc (right): > > https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode377 > ...
3 years, 8 months ago (2017-04-07 15:56:39 UTC) #17
Charlie Harrison
https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode377 components/subresource_filter/core/common/indexed_ruleset.cc:377: // parent document. On 2017/04/07 15:55:17, pkalinnikov wrote: > ...
3 years, 8 months ago (2017-04-07 16:34:03 UTC) #18
pkalinnikov
Addressed, thanks! PTAL again. https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc File components/subresource_filter/core/common/indexed_ruleset.cc (right): https://codereview.chromium.org/2801303002/diff/1/components/subresource_filter/core/common/indexed_ruleset.cc#newcode374 components/subresource_filter/core/common/indexed_ruleset.cc:374: // Returns whether a request ...
3 years, 8 months ago (2017-04-10 09:24:16 UTC) #21
engedy
Still LGTM, thanks!
3 years, 8 months ago (2017-04-10 09:29:17 UTC) #22
pkalinnikov
Charlie, do you want to take another look, or I can submit?
3 years, 8 months ago (2017-04-10 09:30:24 UTC) #23
Charlie Harrison
LGTM great work. Ship it!
3 years, 8 months ago (2017-04-10 12:19:40 UTC) #26
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/2801303002/20001
3 years, 8 months ago (2017-04-10 12:21:57 UTC) #28
commit-bot: I haz the power
3 years, 8 months ago (2017-04-10 12:27:24 UTC) #31
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/e64c5d36227046633521b638ffc2...

Powered by Google App Engine
This is Rietveld 408576698