Opened 14 months ago

Last modified 9 months ago

#6994 closed change

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

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):

https://codereview.adblockplus.org/29907586/
https://codereview.adblockplus.org/29926557/

Description

Background

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

Replace this text with the detailed description of what exactly shall be changed/added and where.

Change History (0)

Note: See TracTickets for help on using tickets.