Live data from Hacker News

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

brave.com

201–210 of 289 posts

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

#201
post #175
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.

This. I use Brave because it has a great, fast adblocker and is fast generally. Unticking all the wallet/AI crap upon install is an acceptable price, but if somebody is going to release Braveium I'm going to use it right away.

Is its adblocker as good as uBlock Origin?

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

#203

It's getting harder and harder to main Firefox. Brave's split tab feature is simple but so brilliant.

The Zen browser - a derivative of Firefox, also supports split tabs (and a lot of others like spaces, vertical tabs and glances). The project seems fairly active and up to date in the past few years.

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

#204
post #176

Earlier quoted context omitted.

So brave has two CSS engines? One for rendering and one for blocking?

Yes. Since for blocking you can afford to have a less mature CSS engine. A tradeoff for performance.

The `selectors` crate is pretty mature to be fair. It's what's used in Firefox for all CSS selector matching. The main advantage of using it is that it's modular so you can just pull that part out without the entire CSS engine.

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

#205

Is that 45 MiB per-tab? People are laughing it off, but since each tab is a process these days..

Those may be forked copies of the main adblocker process. If so, you'll get the benefit of CoW page deduplication.

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

#206
post #108

Earlier quoted context omitted.

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.

or figure out how to build it yourself from source. But you can count on the lazy tax - esp. for windows (as building from source on linux is likely to be much more convenient).

Maybe that's why it is free on Linux!

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

#207

Is Brave actually a good browser now? Did they rewrite it or something? Last time I looked it was a janky JavaScript mess.

> a janky JavaScript mess. You might be thinking of Vivaldi. Brave is certainly buggy, but it's not written in Javascript.

The project is listed as 100% JavaScript on github https://github.com/brave/brave-browser

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

#208
post #105
post #96

Earlier quoted context omitted.

And yet Rust ecosystem practically killed runtime library sharing, didn't it? With this mentality that every program is not a building block of larger system to be used by maintainers but a final product, and is statically linked with concrete dependency versions specified at development time. And then even multiple worker processes of same app can't share common code in memory like this lib, or ui toolkit, multimedi…

> And yet Rust ecosystem practically killed runtime library sharing, didn't it? Yes, it did. We have literally millions of times as much memory as in 1970 but far less than millions of times as many good library developers, so this is probably the right tradeoff.

It's not just about memory. I'd like to have a stable Rust ABI to make safe plugin systems. Large binaries could also be broken down into dynamic libraries and make rebuilds much faster at the cost of leaving some optimizations on the table. This could be done today with a semi stable versionned ABI. New app builds would be able to load older libraries.

The main problem with dynamic libraries is when they're shared at the system level. That we can do away with. But they're still very useful at the app level.

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

#209
post #175

Earlier quoted context omitted.

This. I use Brave because it has a great, fast adblocker and is fast generally. Unticking all the wallet/AI crap upon install is an acceptable price, but if somebody is going to release Braveium I'm going to use it right away.

Is its adblocker as good as uBlock Origin?

You can add the same lists as in uBlock. I haven't seen any ads in years, so yes.

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

#210
post #92

Earlier quoted context omitted.

It does not recursively install dev-dependencies.

> It does not recursively install dev-dependencies. So, these ~100 [direct] dev dependencies are installed by anyone who does `npm install react`, right?

> ~100 [direct]

When you do `npm install react` the direct dependency is `react`. All of react's dependencies are indirect.

Post reply on HN