Opened 2 years ago

Last modified 20 months ago

#6994 closed change

Use shortcut matching for filters with no content type, no domain/sitekey, and no third-party flag — at Version 1

Reported by: mjethani Assignee:
Priority: P2 Milestone:
Module: Core Keywords:
Cc: jsonesen Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

Description (last modified by mjethani)


About half of all blocking/whitelist filters have (1) no content type, (2) no domain/sitekey, and (3) no third-party flag. As long as the request's location matches the pattern in the filter, it is a match. For these filters, there should be a "shortcut" version of the RegExpFilter.prototype.matches method that checks only the location. When such filters are added to the matcher, it should keep them separately so they can be processed separately (with the shortcut version) for each call to the _checkEntryMatch method.

Additionally, in _checkEntryMatch, if typeMask & RegExpFilter.prototype.contentType == 0 is true, these filters should be skipped entirely.

What to change


Change History (1)

comment:1 Changed 2 years ago by mjethani

  • Description modified (diff)
Note: See TracTickets for help on using tickets.