Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd-party filters shows 89,346 filters in fanboy-ultimate while it's only 75,521 lines in the file #293

Closed
mikhaelkh opened this issue Jun 4, 2015 · 3 comments

Comments

@mikhaelkh
Copy link
Contributor

Do you split complex filters or is your calculation wrong?

@mikhaelkh mikhaelkh changed the title 3rd-party filters shows 89,346 filters in fanboy-ultimate when it's only 75,521 lines in the file 3rd-party filters shows 89,346 filters in fanboy-ultimate while it's only 75,521 lines in the file Jun 4, 2015
@gorhill
Copy link
Owner

gorhill commented Jun 4, 2015

Launch and filter lists load performance:

A compiled filter lists is made of a sequence of atomic filters, i.e. filters which can't be decomposed into smaller functional filters. ABP-compatible filter syntax allows the creation of composite filters, i.e. filter declarations which really represents many filters. For example, a raw filter found in EasyList:

/advertisers.$image,script,subdocument

From µBlock's point of view, this is really three separate filters:

/advertisers.$image
/advertisers.$script
/advertisers.$subdocument

[...]

In 0.8.9.0, since all filters are normalized into atomic filter representation, µBlock is now able to detect 100% of filters which are functional duplicates.

And since µBlock's now report the number of atomic filters, expect the count to go up somewhat compared to previous versions. For instance, currently using default filter lists, 0.8.9.0 reports over 58,000 network filters, while previous versions reported around 55,000 network filters.

@gorhill gorhill closed this as completed Jun 4, 2015
@mikhaelkh
Copy link
Contributor Author

OK, but in fanboy-ultimate there are 89,346 filters showed by uBlock0 and 89,186 by uBlock, so one of you may count filters wrong, or uBlock skips more filters that uBlock0 do?

@gorhill
Copy link
Owner

gorhill commented Jun 5, 2015

I had to dig, and the explanation is because uBlock Origin supports the font type filter option. This boost the count of filters on uBlock Origin's side when there is a filter with a "negative" type option:

example.com$~script

This will be translated into:

example.com$image
example.com$stylesheet
[...]
example.com$font

The example.com$font one is not generated in uBlock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants