Issue 7435 - Use request object for filter matching
The issue is described in https://issues.adblockplus.org/ticket/7435.
We create a new internal
URLRequest class that encapsulates a URL request: the URL itself and the document's hostname. It also has properties
lowerCaseHref, both computed on demand and cached. In the matcher, we create a new
URLRequest object based on the given parameters and pass this object around all the way to the
matchesLocation() functions of the filter object, where the
lowerCaseHref properties of the object may or may not be accessed for a given request.
The performance impact of this change is that it results in even lower CPU usage and makes filter matching 5-10% faster approx. for request blocking filters on popular sites.
- Fixes the issue(s)
- Updates tests and documentation
- Passes all tests
- Passes linting