Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Compress basic rules #2

Open
ameshkov opened this issue Jun 21, 2019 · 1 comment
Open

Compress basic rules #2

ameshkov opened this issue Jun 21, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ameshkov
Copy link
Member

ameshkov commented Jun 21, 2019

We should try compressing simple basic rules.

Here's the algorithm.

Take simple third-party blocking rules (e.g. matching this regex: ^\|\|[a-z0-9_.-]+\^\$third-party$):

||example.org^$third-party
||example.com^$third-party

Compress them into a single rule:

^[htpsw]+:\/\/(example.org|example.com)[/:&?]?

The main question here is the impact on the content blocker performance.

@ameshkov ameshkov added the enhancement New feature or request label Jun 21, 2019
@ameshkov
Copy link
Member Author

Ah, Safari does not support | :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants