
Brave Improves Its Ad-Blocker Performance with New Engine in Rust - teovoinea
https://brave.com/improved-ad-blocker-performance/
======
wila
Figured to try Brave as it keeps popping up.

Installed it and then noticed in my firewall that it is

\- trying to connect to a number of IPs owned by google, umm OK

\- sending a multicast SSDP UDP request on port 1900 to 239.255.255.250

So googled that and got this page: [https://community.brave.com/t/why-is-
brave-issuing-upnp-disc...](https://community.brave.com/t/why-is-brave-
issuing-upnp-discovery-requests/46500)

Which basically tells you that the first thing Brave does is to try and detect
what devices are in your local network.

... and that's where my Brave experiment ends.

edit:

Also note that uninstall is completely silent, no confirmation that it
actually completed.

The uninstaller also leaves behind the updater utility AND the Windows Task
scheduler tasks that run the updater.

~~~
rolltiide
Just tell them to fix that since it doesnt need to be looking for Chromecast
devices

The end

~~~
timbit42
What kind of a Mickey Mouse (tm) operation providing a private and secure web
browser wouldn't have fixed such issues from the start? Doesn't help me trust
them.

~~~
rolltiide
They just pull from the Chrome repository before adding their own things, I
dont know what you are expecting

Its like you never heard of Brave

You can just ask them to disable it and now you have your fictional higher
standard team _shrug emoji_

I guess you did mention that you dont use Chrome, so this level of distrust is
going to be foreign for most of us to relate to

------
robbrown451
I'm impressed with Brave. I've started using it as my primary browser (after a
couple false starts a year or so ago) and it has all the best of Chrome
without the worst.

There is controversy about how Brave does stuff, and I agree there is some
sketchy stuff they are doing (replacing ads with their own). I'm glad they are
giving us a choice, though, and exploring different options for sites being
able to makes some money.

~~~
justsee
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 privacy-respecting approach.

For now I think the only ad trials running are pop-up notifications if users
opt-in, and that's only in a few markets at this stage.

Not something I plan to opt-in to, but looking forward to the Github / Reddit
/ Twitter tipping and integrated crypto wallet.

That's all rolling through in the next few months.

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

~~~
piyush_soni
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.

~~~
TuringTest
There's also Reload in Address Bar, which I prefer.

[https://addons.mozilla.org/en-US/firefox/addon/reload-in-
add...](https://addons.mozilla.org/en-US/firefox/addon/reload-in-address-bar/)

Or you can use the "double tap the dots menu" trick.

~~~
piyush_soni
Thanks. The 'Double tapping dots menu' trick is neat indeed, sometimes we
don't figure these things on our own :).

------
tomaskafka
A simple guide to choosing your browser:

Does it make money by showing you ads?

Chrome: Yes Brave: Yes Firefox: No

If yes, then they need to track your behavior in detail. I'm sure you don't
deserve to be tracked.

~~~
olah_1
For me, the guide is more like:

Does it render text in an ugly manner?

Chrome: No

Safari: No

Firefox: Yes

The unfortunate thing is that many Firefox users _prefer_ the Firefox text
rendering.

There’s no solution to fix this (I’ve researched a lot). It’s just a divide in
the users based upon preferences.

~~~
mmmrk
What do you mean by ugly? That GDI text rendering is used on Windows instead
of DirectWrite for some font families? This can be disabled in about:config by
assigning `gfx.font_rendering.cleartype_params.force_gdi_classic_for_families`
an empty value. Or do you mean that there's no subpixel positioning on non-
Windows/macOS? That one has no fix, except when the text rendering part of
WebRender goes into production.

~~~
bscphil
I'm confused. Doesn't Firefox use Freetype on Linux? Freetype has subpixel
rendering.

~~~
mmmrk
Subpixel rendering is different from subpixel positioning.

See e.g.
[https://bugs.chromium.org/p/chromium/issues/detail?id=824153](https://bugs.chromium.org/p/chromium/issues/detail?id=824153)
for some gory details.

------
kodablah
> 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_rule...](https://github.com/cretz/doogie/blob/master/src/blocker_rules.cc)

~~~
tolien
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.

~~~
lemagedurage
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.

~~~
vorticalbox
if you're moving from Firefox to brave you do notice the speed increase. FF on
my work laptop (i5, 16GB of ram) and my s8 is significantly slower that brave.

~~~
potlato
It's been a gift to me, since I really just can't help but install extension
after extension and FF is just not good at that in my experience (plus the
selection is narrower but I don't put that on FF). Another thing is that Brave
has the Chrome url search which I've come to realize is actually pretty
central to me, I just can't stand the 'prepending a letter' type search.
Overall it's the closest I've felt to chrome with the stated goal of
addressing the the primary reason I feel uncomfortable with chrome, so I'm
happy for now.

------
paulcarroty
Brave isn't a choice for me 'cause Google can easily kill all Chrome clones in
one funny day. Also Brave monetization looks very tricky.

~~~
earenndil
Second point I agree on, first point--how? Chromium is opensource. What can
google do?

~~~
justinrlle
People need to stop with this argument. Chromium might be open source, but
it's still Google who decides what get merged. And yes, people can fork, do
their own patches, fixes, but if it deviates too much from Google, you'll end
up with a new browser to maintain on your end without a team the size of
Google. If all theses teams choose to not implement their own browser, it's
for a reason: a web browser is a complex piece of software. And the best
example of this is the Edge team who forfeited implementing their own and just
went with Chromium.

~~~
matthewmacleod
I don't understand why you think this means that Google can _easily kill all
Chrome clones in one funny day_.

~~~
simias
They definitely can't reasonably do that but in the long run I don't think
Brave has the resources to maintain a hard fork from Chromium. That's the main
reason I don't really get the Brave hype when Firefox does the job just fine
and is actually a fully independent codebase instead of a relatively shallow
customization of Chromium.

The only argument that keeps coming up is that Brave has a built-in adblocker
but it's not like installing ublock origin is very challenging in Firefox (and
on top of that your extensions are automatically synchronized if you use the
Sync feature) and the relatively blurry monetization scheme of Brave makes me
think that in the long run this built-in ad-blocker might prove a liability
more than a strength. I'll take my ad-blocking independent, third-party and
non-profit, thank you.

~~~
basch
Brave, Opera, Vivaldi, Epic, Blisk, (and Edge?) can pool development
resources. I dont think all the forks would have as much problem as people
believe they would. A ton of webkit users switched to blink nearly overnight.

I think the bigger issue is chrome implementing an new web feature that blink-
fork2 and firefox dont agree with, that web devs start implementing anyway.
Google controls web development more than they control browser development.

Theres also the WideVine argument, but for me personally I dont see why i need
my primary browser to also play netflix. Its not that hard to open a separate
netflix app/browser. The amount of drm encapsulated video I watch in my
browser is minimal to none.

------
glangdale
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" :-) ).

~~~
pythux
As far as I know the « regex » crate is used in some places. But interpreting
block rules has a lot to do with specific options and behaviors which are
pretty tailored to the task and it would not be easy to use off the shelf
regex implementations for this. Although I myself looked at Hyperscan in the
past for the purpose of blocking ads (the performance looks amazing!).

------
muckrakerz
Brave is doing some of the best anti-Corporatist work in the community right
now.

~~~
dymk
They replace other ad network ads with their own ~ads~ _crypto currency_. They
monetize the content of others and don't tell them. If you have a youtube
channel, they will swap out ads and _collect the ad revenue_ without telling
the channel that they're doing so.

I'm not particularly impressed with their business. In fact I'm pretty
disgusted with it.

~~~
muckrakerz
Yes. I want a citation for this. As far as I'm aware this is completely
untrue.

~~~
ppeetteerr
Found one

[https://www.computerworld.com/article/3284076/brave-
browser-...](https://www.computerworld.com/article/3284076/brave-browser-
begins-controversial-ad-repeal-and-replace-tests.html)

And on their own site:

[https://brave.com/brave-ads-launch/](https://brave.com/brave-ads-launch/)

~~~
BrendanEich
Your second link is to our blog post about _user ads_ , which do not go in
slots on publisher pages.

Your first link is to a tech journalist who misreports what we actually do,
for reasons I cannot fathom and won't guess at.

Anyway, we do not replace publisher ads we block. Check it out for yourself.

------
fouc
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.

~~~
kn0where
I think that was a large factor, but I think constantly showing ads for Chrome
to anyone who views google.com in a different browser and telling them their
browser is bad was a bigger factor.

~~~
cbdumas
I mean also the fact that the browser most people used at that time _was_ bad
may have been a factor. Chrome was a noticeable step up from IE.

~~~
jefftk
For me, Phoenix/Firebird/Firefox was a noticeable step up from IE, and Chrome
was a noticeable step up from Firefox. Chrome did especially well relative to
Firefox when I had a lot of tabs, and for JS-heavy sites.

I bounced back and forth several times:

* I tried it for a month in January 2010, and went back to Firefox because Chrome was slower and less stable: [https://www.jefftk.com/p/google-chrome](https://www.jefftk.com/p/google-chrome)

* I tried it for ~6m in 2011, and switched back to Firefox because I missed side tabs: [https://www.jefftk.com/p/side-tabs](https://www.jefftk.com/p/side-tabs)

* In early 2012 I switched back to Chrome, despite the lack of side tabs (which I still miss dearly) because it was enough more performant.

(Disclosure: I work for Google)

~~~
tomaskafka
Try switching once more, and turn on Webrender this time - it's still beta,
but I had no issues and it made my FF Chrome-fast.

~~~
jefftk
Several reasons for not switching back, some idiosyncratic:

* I trust Chrome more than Firefox on security

* I'm used to Chrome's debugging tools, and would need to learn Firefox's

* I use the Chrome password manager, and it would be annoying to switch

If Firefox were enough better I would still switch, but at this point my
understanding is it's more like "Firefox is no longer slower than Chrome" not
"Firefox is a step up from Chrome in the way Chrome once was from Firefox".

~~~
potlato
That's understandable though I imagine it's unlikely we'll see something like
that ever again, right? To me it seems kinda like how race car engineers used
to be able to discover some major advancement in their engines that would give
them wins for a few years but nowadays it's much more homogenous and worked
upon for much less significant gain. I don't know much about the deeper webdev
stuff though so who knows, but it seems like that could only ever really
possible with a shift in a browser trying some novel shift in architecture.

------
mindfulhack
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 'Customize...', and that's so clunky and
2004. They have some more work to do to really make it competitive with the
mighty Chrome.

So after all that time, Brave is the first browser registering my interest due
to these regular news stories. I still use Google services, but I don't like
their current dominant position in shaping how the web works. That's too much
power.

~~~
rsj_hn
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.

~~~
ahalam
If only my corp allowed me to upgrade the macOS on my laptop, I would be using
the latest Safari too instead of messing with Chrome / Brave.

~~~
nindalf
I hear the opposite sentiment at my workplace. "If only they didn't force us
to update OS X ASAP"

------
azhenley
Does it automatically block ads that try to access audio?

[https://news.ycombinator.com/item?id=20288768](https://news.ycombinator.com/item?id=20288768)

~~~
DoctorOW
Brave actually does. It broke my various VOIP sites at first because you have
to manually allow audio access

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

~~~
sixplusone
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++.

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

~~~
pythux
It’s actually a Rust implementation of [https://github.com/cliqz-
oss/adblocker](https://github.com/cliqz-oss/adblocker). So you can interpret
the difference in the chart between Ghostery and Brave as being how much Rust
improved performance over Node.js

------
RyanAF7
Been using Brave for a while now... maybe 2 years? Have a lot of unused BAT
since few sites recognize the payments yet.

Once they do, it'll be pretty amazing.

~~~
Scott_Sanderson
The nightly build has tipping buttons for twitter and reddit. Hoping this will
finally execute the micropayment use case for crypto.

The pop up ads have been activated and I have been receiving the token for
clicking, about $8 month worth of BAT. I am hoarding the tokens so that USD
value might go up if the token moons together with bitcoin.

------
ElijahLynn
I think Brave has the ability to save the web, it has a great model of
blocking ads by default, at a lower level than the extensions do so it is much
faster. I think Opera had/has this too.

~~~
catacombs
Sure, Brave can block ads, but isn't the browser exploring injecting its own
advertisements?

~~~
codehalo
Brave does not inject ads. This is misinformation.

~~~
bscphil
Ars Technica seems to disagree with you:

> Brave will replace blocked ads with its own ads, taking a 15% cut of
> revenues.

> In practice, Brave just sounds like a cash-grab. Brave isn't just a
> glorified adblocker: after removing ads from a webpage, Brave then inserts
> its own programmatic ads. It sounds like these ads will be filled by ad
> networks that work with Brave directly, and Brave will somehow police these
> ads to make sure they're less invasive/malevolent than the original ads that
> were stripped out. In exchange, Brave will take a 15 percent cut of the ad
> revenue. Instead of using tracking cookies that follow you around the
> Internet, Brave will use your local browsing history to target ads.

[https://arstechnica.com/information-
technology/2016/01/mozil...](https://arstechnica.com/information-
technology/2016/01/mozilla-co-founder-unveils-brave-a-web-browser-that-blocks-
ads-by-default/)

From my point of view it's essentially a scam on multiple levels:

1\. It doesn't significantly change the Web - users will still look at ads.

2\. Without providing anything of value (see 1), Brave gets a cut of
publisher's ad revenue.

3\. As incentive not to sue them into oblivion, Brave offers publishers a cut
of the stolen revenue.

4\. The whole thing is built on top of a sketchy cryptocoin system where a
significant stake is owned by the developers.

~~~
Dylan16807
It seems to disagree because it's a very old article about what Brave "will"
do.

And removing tracking from ads is a massive improvement on the status quo.

~~~
bscphil
It seems still be an accurate assessment of what they are planning.

> Ads and trackers are blocked by default. You can allow ads and trackers in
> the preferences panel.

> Later, as mentioned above, Brave will let you opt into receiving a reduced
> ad load that comes without trackers, maintains your privacy and helps
> support the publishers you like.

[https://brave.com/faq/](https://brave.com/faq/)

Do you have any evidence that Brave's ads are _not_ intended to be a
replacement for traditional ads on publisher sites? What else would they be
for?

And, regardless, the rest of my comment stands. It may be "better" to shows
ads without tracking, but it's still rent-seeking in the ad blocking space. Ad
blocking is a solved problem - just use uBlock origin.

Edit: from only a year ago:

> Brave will scrub sites of ads and ad tracking, then replace those ads with
> its own. Meanwhile, BATs will be awarded based on user attention, or put
> plainly, time spent viewing ads and content. Brave users who agree to
> receive ads will be rewarded with BATs. The tokens, in turn, will be
> exchanged between users, advertisers and site publishers.

[https://www.computerworld.com/article/3284076/brave-
browser-...](https://www.computerworld.com/article/3284076/brave-browser-
begins-controversial-ad-repeal-and-replace-tests.html)

~~~
Dylan16807
According to
[https://news.ycombinator.com/item?id=20290854](https://news.ycombinator.com/item?id=20290854)
Brave's ads won't go into the page unless the publisher agrees, and the
current ads are shown as notifications. Note that while your link uses the
word 'replace', the source blog post does not.

~~~
bscphil
Assuming that user is even right about this, I would call that the most
extreme imaginable version of trying to buy off publishers with a cut of the
lost revenue. That's #3 on my list of scammy Brave practices.

------
mlinksva
Will this be the first use of Rust in a non-Firefox production release
browser? If not, what was the first?

[https://github.com/brave/brave-
core/search?q=rust](https://github.com/brave/brave-core/search?q=rust)
[https://github.com/brave/adblock-rust-ffi](https://github.com/brave/adblock-
rust-ffi) [https://github.com/brave/adblock-
rust](https://github.com/brave/adblock-rust)

------
sajithdilshan
I've switched from chrome to Brave (with duckduckgo as default search engine)
after seeing this
[https://myactivity.google.com/myactivity](https://myactivity.google.com/myactivity)
and really satisfied with the result.

Unfortunately Firefox is not a good match. I've tried the latest versions of
Firefox and the developer edition, before using Brave and it still uses so
much CPU in my macbook and the fan of the laptop sounds like an airplane is
about to take off.

~~~
bugmen0t
Maybe you want to opt out of Google activity tracking? When I go to that page
it says "No Activity".

------
wet_grass_sound
It is more likely they hired a new rust developer that simply wrote better
code.

------
viach
I'm wondering, how Brave is going to fight fraud? The users are anonymous and
not tracked, isn't this is why Brave ads are still delayed and TBH I see no
practical solution to that?

------
aneutron
How does it stack up against uBlock Origin on Chrome ? ABP is a notoriously
heavy unoptimized piece of software compared to uBlock. I would be very
interested in this comparison.

------
ShirsenduK
Slightly off topic: Does anyone else have the problem of constantly being
logged out of your Google accounts on Brave. I keep getting logged out even
without closing the browser. I have tweeted to them but haven't been able to
get a response. I am so annoyed with the experience that I stopped
recommending it and am planning to switch back to Chrome.

Edit: I have multiple Google accounts signed into. And also, it does not block
all ads in GMail which uBlock on Chrome is able to.

~~~
jchw
The way they’re handling cookies may be just be strict enough that it can
break security measures on some sites. Unfortunately, lots of websites have
come to rely on things that maybe should’ve never been features (like third
party cookies, for example.)

Just out of curiosity, have you tried Firefox? I know it’s not perfect, but
with minimal tweaking I think it’s very competitive.

~~~
ShirsenduK
Yes, Firefox is good for browsing but as a developer who has to work on the
frontend, the ecosystem isn't there in Firefox. Many of the framework
debugging tools for React, Redux, etc. don't work well in Firefox.

~~~
jchw
I will agree the devtools are not always as polished, but actually React and
Redux debugging tools have worked fine for me. I have these installed:

[https://addons.mozilla.org/en-US/firefox/addon/react-
devtool...](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)

[https://addons.mozilla.org/en-
US/firefox/addon/reduxdevtools...](https://addons.mozilla.org/en-
US/firefox/addon/reduxdevtools/)

...And I don't really recall many issues.

Ever since WebExtensions, there's not really a good reason for the devtools to
be much worse on Firefox.

If you have used these extensions and have issues, I'd love to hear them. I've
done React/Redux dev on both and I don't notice things working significantly
better in Chrome. (Admittedly, I haven't done any in a few months.)

The only real thing that gets me now is the lack of being able to inspect
WebSocket frames. :(

~~~
ShirsenduK
Thanks for clarifying! I should give Firefox a try again, when I tried last
time it wasn't good enough. Chrome's devtools had many features of timing and
performance which were absent or not good enough last time I tried.

------
wtdata
Well, when are they going to remove the ad placeholders on pages? It's great
we don't have to see ads, but they still take valuable screen space this way.
With uBlock origin, I don't have to see te placeholders.

------
microcolonel
Anyone familiar with configuring the Brave ad blocker? I find that by default
it blocks fewer ads than uBlock origin. I'm not really sure what special sauce
is involved in that.

~~~
dpacmittal
You can just install ublock origin extension on brave and get best of both
worlds.

~~~
_emacsomancer_
Or AdNauseam (
[https://news.ycombinator.com/item?id=19278936](https://news.ycombinator.com/item?id=19278936)
)

------
ubercow13
Can you use your own block list in Brave? Last time I checked on mobile I
couldn't see how to. If not that seems like a major downside compared to other
browsers.

~~~
sexy_seedbox
I switched to Kiwi Browser recently from Brave ( _after their bottom tab bar
drama_ ). Kiwi allows extensions so you can install uBlock Origin and add your
own lists.

------
elcomet
Brave mobile started letting ads go through a few months ago for me. I
switched to Firefox mobile, which is not as fast / usable but at least
supports ublock.

------
jevans22
As an advertiser, you hate to see things like this :)

~~~
cameronbrown
Why? Most people using Brave would never have clicked your ads anyway.

~~~
ec109685
Do you have a citation for this? Why would brave users be less likely to click
on ads than a normal user if they weren’t using a browser that blocked ads?

------
jammygit
Not many people talking about fingerprinting. Which browser does a better job
of blocking it?

------
shereadsthenews
Alternate title: Until recently Brave was orders of magnitude slower than
other blockers.

~~~
woah
I've been using brave for a few months and I never noticed any difference in
its ad blocking performance vs Chrome with AdBlock. I actually perceived it as
faster, since most AdBlocking plugins on chrome actually let some ads through
(ads that pay the plugin authors i guess).

In what situation would this "orders of magnitude slower" actually manifest
itself as a perceptable delay?

------
known
I think Firefox should tie-up with Wikipedia for donations

------
jerrygoyal
kiwi browser is worth a shot and made me switch from brave.

------
whereareyouwow
Brave in Tor with YouTube seems to track you and show you recommended videos
across sessions. Probably some browser fingerprinting. But always found that
weird considering it portrays itself as privacy-focused.

~~~
SahAssar
Brave doesn't block first party cookies by default IIRC, so that's not hard to
imagine.

------
techrich
Coming to Dissenter browser soon :D

------
gingabriska
Will his be on android too?

------
thiagoc
Never used Brave, but switched to Opera recently and it's doing great in
blocking ads.

------
andrethegiant
Safari + DuckDuckGo + 1Blocker. Fast, private, no ads.

------
JoachimS
They should have written it in Rust, oh wait...

------
alectivism
nice

------
count
nice.

~~~
MultusSalus
Nice.

