Opened 16 months ago

Last modified 13 months ago

#7435 closed change

Use request object for filter matching — at Version 1

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

Description (last modified by mjethani)


Currently the matcher does the following:

  1. Lower-cases the request URL for each keyword
  2. Checks if a request is third-party for each request

There's no need to lower-case the URL for each keyword, it can be lower-cased once and the lower case version cached.

For ~15% of the requests on the Alexa Top 50 (home pages only), I found that there was no need to check if the request was third-party.

All of this can be solved by using a single request object in the matcher and simply passing it around.

I find that this approach, if done correctly, can further speed up filter matching for request blocking filters by ~10% on popular sites.

What to change

See patch.

Integration notes


Hints for testers


Change History (1)

comment:1 Changed 16 months ago by mjethani

  • Description modified (diff)
  • Ready set
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.