Live data from Hacker News

Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

brave.com

41–50 of 289 posts

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#41
post #21

Does Brave actually block ads now? Or does it still replace them with ads for scanmy cryptocurrency?

Unlike other reply, I do not work at Brave, and I can also confirm that Brave never did that. They do have their own ads but those have always been opt in (you are not opted in by default), and they do pay some small amount of USD in their crypto token for opting in to those - it's pennies. People scoff at the pennies but guess who pays out nothing to show you ads against your will - literally everyone else.

What you may be thinking of was at one point, when you went to a URL (for some URLs), the browser would rewrite the URL to contain their affiliate link. There was blowback for doing that. They quickly removed that/haven't done it since as far as I know

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#42
post #6
post #4

Earlier quoted context omitted.

> these days Are you referring to current RAM prices or bloat of numerous Electron apps?

A $130 Motorola smartphone has 8GB of RAM. This will save 0.5% RAM. It's fairly negligible on modern systems.

OK now do the math for someone who has 200 tabs open. Remember that basically all browsers these days spin up one process per tab.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#43
post #12
post #6

Earlier quoted context omitted.

A $130 Motorola smartphone has 8GB of RAM. This will save 0.5% RAM. It's fairly negligible on modern systems.

Now multiply that across all apps/services/extensions/profiles and it adds up. This kind of lazy thinking is why today’s software is so bloated and slow.

It adds up but it would require to rewrite all software, which would be pretty costly.

I agree with the sentiment but it's a bit too late now.

The problem is with how software is designed around being cheap to write.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#45
post #26
post #24

I am surprised there does not exist a community fork of Brave yet that strips out all of the commercial stuff (rewards, AI, own updates), making it suitable for inclusion in the repos of mainstream free/libre Linux distros.

There is quite a lot of costs associated with running a browser (at scale). Brave is looking to offer something that does what you mention called Brave-origin. Brendan talks about this a bit more here: https://x.com/BrendanEich/status/2006412918783619455

This is good news, but I am confused by the following:

"""

Brave Origin is:

1/ new, optional, separate build (stripped down, no telemetry/rewards/wallet/vpn/ai);

2/ free on Linux, one time buy elsewhere.

"""

So the stripped down version (at least the non-Linux one) will not be open source?

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#46
post #32
post #24

I am surprised there does not exist a community fork of Brave yet that strips out all of the commercial stuff (rewards, AI, own updates), making it suitable for inclusion in the repos of mainstream free/libre Linux distros.

It's annoying, but Brave makes it pretty easy to remove, so you only have to do it once per installation.

As far as I am concerned, this is more about Brave going through a vetting process and an independent build than only turning off annoyances.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#47
post #38

Earlier quoted context omitted.

At risk like node/npm with all the supply-chain attacks then? Or is there something that cargo does to manage it differently (due diligence?).

Supply-chain attacks aren't really a property of the dependency management system Not having a dependency management system isn't a solution to supply chain attacks, auditing your dependencies is

> auditing your dependencies is

How do you do that practically? Do you read the source of every single package before doing a `brew update` or `npm update`?

What if these sources include binary packages?

The popular Javascript React framework has 15K direct and 2K indirect dependencies - https://deps.dev/npm/react/19.2.3

Can anyone even review it in a month? And they publish a new update weekly.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#48

Brave's adblocking engine is a neat example of open source and the ease of sharing lbraries in Rust. It uses Servo crates (also used by Firefox) to parse CSS and evaluate selectors, and is then itself published as a crate on crates.io where it can be pulled in by others who may want to use it.

At risk like node/npm with all the supply-chain attacks then? Or is there something that cargo does to manage it differently (due diligence?).

You can use "cargo vendor" to copy-paste your dependencies C-style if you want to, and audit them all if you want. Mozilla does this for Firefox.

Cargo does have lock files by default. But we really need better tooling for auditing (and enforcing tha auditing has happened) to properly solve this.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#49
post #45
post #26

Earlier quoted context omitted.

There is quite a lot of costs associated with running a browser (at scale). Brave is looking to offer something that does what you mention called Brave-origin. Brendan talks about this a bit more here: https://x.com/BrendanEich/status/2006412918783619455

This is good news, but I am confused by the following: """ Brave Origin is: 1/ new, optional, separate build (stripped down, no telemetry/rewards/wallet/vpn/ai); 2/ free on Linux, one time buy elsewhere. """ So the stripped down version (at least the non-Linux one) will not be open source?

Open source software can be sold for money. For example redhat selling cds with rhel on them, for quite a big sticker price. Free if you build it yourself but you have to pay to get a ready to use version.

Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%

#50
post #47
post #38

Earlier quoted context omitted.

Supply-chain attacks aren't really a property of the dependency management system Not having a dependency management system isn't a solution to supply chain attacks, auditing your dependencies is

> auditing your dependencies is How do you do that practically? Do you read the source of every single package before doing a `brew update` or `npm update`? What if these sources include binary packages? The popular Javascript React framework has 15K direct and 2K indirect dependencies - https://deps.dev/npm/react/19.2.3 Can anyone even review it in a month? And they publish a new update weekly.

Normally it would omly be the diff from a previous version. But yes, it's not really practical for small companies or individuals atm. Larger companies do exactly this.

We need better tooling to enable crowdsourcing and make it accessible for everyone.

Post reply on HN