Brave defies Google’s moves to kill ad-blocking

Liam Tung for ZDNet:

Brave, the Chromium-based browser developed by Firefox co-founder and JavaScript creator Brendan Eich, thinks there’s a better way of handling ad-blockers than Google’s approach.

Brave’s answer, which it argues massively improves browser performance, is found in Rust, the Mozilla-hatched programming language that was in part created by Eich.

As ZDNet reported in June, developers of Chromium-based browsers like Opera, Brave and Vivaldi, didn’t support Google’s plans to cripple ad-blockers outlined under its Manifest version 3 proposal.

Brave now claims to have delivered a “69x average improvement” in its ad-blocking tech using Rust in place of C++. The improvements can be experienced in its experimental developer and nightly channel releases.

Eich told ZDNet earlier this month that Brave intended to support webRequest for all extensions in Brave, against Google’s Chromium plans to heavily restrict it while offering a knee-capped replacement.

Dr. Andrius Aucinas and Dr. Ben Livshits for Brave:

We therefore rebuilt our ad-blocker taking inspiration from uBlock Origin and Ghostery’s ad-blocker approach. This focuses on a tokenization approach specific to ad-block rule matching against URLs and rule evaluation optimised to the different kinds of rules. We implemented the new engine in Rust as a memory-safe, performant language compilable down to native code and suitable to run within the native browser core as well as being packaged in a standalone Node.js module. Overall, we found that:

• The new algorithm with optimised set of rules is 69x faster on average than the current engine.

• For the popular filter list combination of EasyList and EasyPrivacy it achieves class-leading performance of spending only 5.7μs on average per request.

• An additional benefit of having the blocker built into the core of the browser is even less work duplicating what the browser already does, e.g. for URL parsing. With this information already available, our browser-focused API provides still better performance, cutting average request processing time down to 4.6μs.

• The new engine already supports more of the filter rule syntax that has evolved beyond the original specification, which will allow us to handle web compatibility issues better and faster.

For performance measurements in this study we used a 2018 MacBook Pro laptop with 2.6 GHz Intel Core i7 CPU and 32GB RAM.

MacDailyNews Take: For years, we abused our dear readers by pummeling our visitors with more and more banners as advertising rates plummeted. No more.

We apologize. Deeply.

We’d rather go under being proud of the site, now approaching our 17th anniversary, than to continue it as an ugly mess.

Our new site (just launched on month ago!) is optimized for speed and responsiveness, with far fewer ads. We are currently operating at a loss. We’ve been adding more features over the first month and will continue to do so! We continue to offer a steady stream of content, insights, and links. Please tell your Apple-loving friends to check out the new MacDailyNews! We hope you’ll whitelist us if you’d like the site to continue. We are also planning an ad-free option for a price of around a latte per month. Stay tuned.

To whitelist MacDailyNews using the Brave browser, simply click the shield icon in the right of the browser’s address bar and set “Shields Down.” You can further refine Brave shields in Preferences: Brave shields defaults.

You can find out more about the Brave browser and use the download link to try it out here.

This article was originally posted here