Monday, June 25, 2012

AdBlock now supports 3rd party subscriptions!

For those waiting for new release I have a great news!
As you may notice, there has been a very little activity in development in last months. But this is no longer true.

Apart from some small bugfixes, the main thing I want to write about in this post is improved AdBlock.

One of the very desired feature in QupZilla asked by users was support for 3rd party subscriptions in AdBlock:
  • Issue #266 - New Adblock subscriptions
  • Issue #391 - RuAdList support in QupZilla

AdBlock has been almost completely refactored. One thing you will notice almost immediately is, already mentioned, support for adding/removing additional subscriptions. You have option to add new subscription manually from AdBlock dialog or by clicking on abp: links (eg. here).

New AdBlock dialog (with displayed options menu)
More important thing than support for new subscriptions is optimized performance and support for more types of rules. Actually, all rule types except few options ($ char in rule) are currently supported.

The old implementation of rules matching algorithm was using regular expressions (regexps) for every rule. Regexp matching is obviously slower than simple string matching.
If you look at list of rules in subscription, you will see that a big part makes very simple rules (without wildcars (*) or anything else).
Those simple rules, like &adurl=, can use simple string matching and thus gains performance benefit.
Because of that, string matching is now used as often as possible.

But please remember, even with improved performance, you shouldn't add too many subscriptions!

Last thing I'd like to mention is support for CSS element hiding rules including support for domain restrictions.

Improving AdBlock was last big thing before releasing new version 1.3.0.
I have created milestone on github to help you track blocking issues before release.
I hope new version will be ready really soon, I'll keep you informed.