Live data from Hacker News

Brave Improves Its Ad-Blocker Performance with New Engine in Rust

brave.com

181–190 of 382 posts

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#181

So I’m confused about the results. Is the engine faster because of rust or because of improvements to the algorithm?

It's a new, faster algorithm with rule pattern matching. The language is only mentioned once as an implementation detail, not that rust's 69x faster than C++.

According to https://github.com/brave/adblock-rust they use a similar algorithm as uBlock Origin. So not really "new", just reimplemented in rust.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#182
post #161

Earlier quoted context omitted.

Hi, in my sparetime I help some of the linux packaging for Brave. We are looking for people to help us do this very thing. We provide packaged for deb, rpm, and snap. I maintain the snaps for brave but have been disappointed with the performance. If you are willing to test an maintain distros we'd be more than happy to get you involved.

Brave is a private, for-profit company that has raised $42 million in venture funding—out of curiosity why do you bother doing free work for them in your spare time?

This same argument is true of nearly all companies, including "not for profit." For instance the chair at Mozilla/FireFox pays himself $1.1 million a year, the treasurer $1 million. [1] And those numbers are probably higher now. That's from 2016, the most recent published data on their site. Since 2013 [2] their CEO has increased his yearly compensation by more than $300k, and the treasurer increased his pay by more than $400k a year. And now with Mozilla planning to release a pay-per-month browser (because their half a billion dollars in revenue just isn't enough!), we can expect to see that executive compensation skyrocket even further.

What people like to imagine "not for profit" means is not what it means in practice.

[1] - https://assets.mozilla.net/annualreport/2016/2016_Mozilla_Fo...

[2] - https://news.ycombinator.com/item?id=10101637

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#183
post #123
post #94

Earlier quoted context omitted.

Switched from Firefox to Brave in the last year across devices and not looking back (though I do miss containers!). Blocking ads and trackers by default is pretty much essential in 2019. The myth about ad replacement doesn't seem to want to die though! There is no ad replacement, though the roadmap says at some time in the future publishers who opt-in will have the option to have their ad-slots filled by Brave's priv…

I just use Firefox with uBlock Origin on all my devices. Better blocking than Brave and no concerns about future monetization.

I'm currently using Firefox on all devices as my primary browser, but there is a single feature that I've gotten used to in Chrom* browsers on mobile - 'pull down to refresh' - that looks indispensable to me, and I'm planning to move to Brave on mobile just because of that (already replaced Chrome with Brave on Desktop as my secondary browser). Yes, there are add-ons to do that on mobile too, but they are all inconsistent and half-baked. Chrom*'s built-in pull to refresh is very smooth.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#184
post #161

Earlier quoted context omitted.

Hi, in my sparetime I help some of the linux packaging for Brave. We are looking for people to help us do this very thing. We provide packaged for deb, rpm, and snap. I maintain the snaps for brave but have been disappointed with the performance. If you are willing to test an maintain distros we'd be more than happy to get you involved.

Brave is a private, for-profit company that has raised $42 million in venture funding—out of curiosity why do you bother doing free work for them in your spare time?

Maybe to help insure that a mono-browser environment is not in our future?

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#185
post #123

Earlier quoted context omitted.

I just use Firefox with uBlock Origin on all my devices. Better blocking than Brave and no concerns about future monetization.

I'm currently using Firefox on all devices as my primary browser, but there is a single feature that I've gotten used to in Chrom* browsers on mobile - 'pull down to refresh' - that looks indispensable to me, and I'm planning to move to Brave on mobile just because of that (already replaced Chrome with Brave on Desktop as my secondary browser). Yes, there are add-ons to do that on mobile too, but they are all inconsi…

I primarily use Firefox on my desktop, but I use Brave on mobile. It seems somewhat easier on the battery than Chrome, which would make sense being as it's blocking content that can be CPU intensive.

You might like it, though. I've used Brave's mobile sync and it works for bookmarks across devices quite well. It's surprisingly simple to set up, too. I don't fret much about forgetting whether I opened a tab on my phone or desktop if I remember to bookmark it.

That said, I still use KDE connect to send links to my primary Firefox instance and vice-versa, but the bookmark sync is in some ways more convenient. I'd imagine they'll eventually synchronize more things, like tabs.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#186
post #176

It's sad how, although I personally prefer to support Firefox by using it, I have still stuck with Google's Chrome due to a speed/sleekness factor which I can't quite put my finger on, that Firefox has never been able to overcome in my mind since fully switching over to Chrome several years ago. It's little touches like how you can't re-order extension buttons with a basic mouse drag - no, you have to go into 'Custom…

Recently I've had terrible performance issues with chrome. Freezes, crashes, and really long delays, as well as significant memory usage. I switched to Brave, but it was worse. Safari, by contrast, has been amazingly fast and responsive.

I've had quite the opposite experience there. I eventually settled on Brave because of my browsing habits. In particular I tend to have several windows of a browser open with dozens of tabs a piece and tend to rarely reboot my machine. Capping all this off is that I enjoy playing chess, which relies on millisecond responsivity. This [1] is a screen cap of the current performance usage of Brave. It's completely negligible, and hasn't been restarted for days. The higher memory processes are exclusively from pages I am currently using with extensive content loaded on them.

No clue about Safari but Firefox dies under these conditions, and I'm not interested in Chrome given not only Google but their 'vision' for the future of that browser including native anti-ad blocking. Opera was okay, but I enjoy the privacy features of Brave. Native ad-block, tracker blocking, etc that can all be customized per site in literally two clicks. Lion->Third Party Trackers for instance would allow me to enable third party trackers exclusively on Hacker News if, for some reason, I wanted to. Pretty cool stuff.

[1] - https://i.postimg.cc/Xq9fjFsc/Capture.png

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#187
post #171
post #119

The discussion in this thread makes me wonder if Brave is a good browser to recommend to friends & family. The widespread usage of Chrome was probably largely in part due to folks like us recommending it to friends & family.

In Brave, Undo Closed Tab doesn't work for me. It should supposedly work with Ctrl+Shift+T, as per an online search. Like Chrome, the built-in session save and restore (after a crash or close) is mostly miss, with few occasions of hits. It's good at blocking ads, but these other factors are enough to keep me on Firefox.

You must be talking about private browsing or the native TOR windows. No history at all is retained for those windows and so restoring closed windows/tabs is not possible. For regular browsing sessions tab restore and session restore work 100%. I have plenty of sloppy tab clicking experience to prove it!

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#188
It's interesting to see block list creators more or less reinventing all the tricks that network-security regex implementation people invented 10-20 years ago. One wonders whether they might do better picking up an off-the-shelf regex implementation (e.g. our own Hyperscan, or for those who must must must have something in Rust, the engine from ripgrep, which I believe is just called "regex" :-) ).

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#189
post #71

> was already implemented in heavily optimized C++ handling requests with sub-millisecond overhead, we found that we can further optimise it for a 69x average improvement Seems like an unnecessary optimization, though I'm sure it was fun. I wrote one a little while back in C++ also[0]. It's not documented the best, but uses a kind of custom tree to match. 0 - https://github.com/cretz/doogie/blob/master/src/blocker_ru…

They're presumably gaining the other non-performance advantages of Rust over C++ (i.e. the borrow checker etc.) though, so safer and faster is a win. As you say though, they seem to focus on performance but that might just be the audience they see themselves talking to.

I think "Chrome but faster" would convince a mainstream audience pretty well, even though they might not be aware that they're not going to notice the milliseconds.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#190

Earlier quoted context omitted.

Why would they have to? The user has opted in. From your link: "Starting today, users of Brave’s latest release of the desktop browser for macOS, Windows, and Linux can choose to view privacy-preserving Brave Ads by opting into Brave Rewards" [emphasis mine] Stop spreading FUD.

Does the content creator get a cut from Brave?

Like everything on Brave it's all up to the user. First the user has to opt-in to this ad program. By default Brave simply blocks everything. If they opt-in then they will be able to see a number of ads per hour that they specify. Of these ads, 70% of the revenue will go straight to the user and 30% will go to brave. The user then decides how their coins will be spent. There are straight forward ways for users to support their favorite sites or content creators. So imagine you want to support site.com, you could choose to automatically donate some chunk of your tokens to it per month. From then on everything would be automatic, the user would just browse as normal, accumulate tokens, and the site would be compensated.

In my opinion this is also the ideal system since it removes the fundamental problem of advertising. And that is that when a company relies on advertising, their customer is no longer the people visiting their site - but the advertisers they make money from. This can lead to advertiser influence slowly creeping into every aspect of the site, including the content that is created. By directing the ad revenue to the user who then directs it to sites (at their discretion) it keeps the benefits of "free" sites, while removing all the nastiness that generally comes with ad-based revenue systems by untangling the relationship between advertiser and content creator.

Post reply on HN