6 ms·
Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
- bqmjjx0kac 9mo agoI'm not sure how impressed I should feel about saving 45 MiB these days.
- mhitza 9mo ago45MiB is for the default adblock setup, and it scales with the more block lists you have enabled. I'll happily take performance improvements cause most products lack any efficiency care nowadays.
- jaybirdkwo 9mo ago[flagged]
- timeon 9mo ago> these days Are you referring to current RAM prices or bloat of numerous Electron apps?
- nomel 9mo agoA $130 Motorola smartphone has 8GB of RAM. This will save 0.5% RAM. It's fairly negligible on modern systems.
- formerly_proven 9mo ago130USD for 8GB RAM will be a good price for a bare DIMM in two weeks.
- renewiltord 9mo agoI can sell you 16 GB DIMMs today for less than 2x that so that you can profit.
- Retric 9mo agoThese days you’re getting 4GB at that price point and you’re losing memory to the OS thus user space memory is even more constrained.
- Bombthecat 9mo agoSmartphone producers already announced to cut ram this year... Just FYI
- devwastaken 9mo ago4GB of that taken by the system. more memory use with runtimes also means more cpu to track and free memory.
- moscoe 9mo agoNow 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.
- jokoon 9mo agoIt 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.
- winrid 9mo agoIt's so much cheaper to optimize now than before.
- morshu9001 9mo agoIt's just Brave browser, you don't multiply by the number of every kind of service
- mikkupikku 9mo agoWith your attitude towards improving one piece of software, it becomes every piece of software.
- deleted 9mo ago[deleted]
- array_key_first 9mo agoIt's more than that, because generally performance is also much worse if you're using a shit ton of memory. That's because CPUs are bottlenecked by cache. So more memory means cache has to be flushed more often, and there will be more misses, which can greatly impact performance.
- nwallin 9mo agoOK now do the math for someone who has 200 tabs open. Remember that basically all browsers these days spin up one process per tab.
- nomel 9mo agoModern browsers don't keep those 200 tabs in active memory. Hasn't been the case for over a decade.
- WhyNotHugo 9mo agoBut they do keep the active tab of each window in memory. Firefox even continues rendering all active tabs in all windows, even if for windows which are not visible. Not sure if this 45MB is per browser instance or per tab, but it’s the latter case, 10 windows would save 450MB. >10% on a lower-end device.
- astrange 9mo ago"Saving X% of RAM" isn't a thing because RAM is itself a cache of compressed swap space and/or mapped files. The lesson here is pointer-chasing data structures and trees are a lot more expensive than everyone and most programming languages like to pretend they are.
- jamesnorden 9mo agoThis kind of attitude is why everything is so bloated nowadays...
- allarm 9mo agoVery.
- infogulch 9mo agoAdblock data is accessed on every request; so this is 45 MiB of cpu cache.
- cozzyd 9mo agoI mean unless it's a linear search through the whole list, I doubt you save that much cache.
- hagbard_c 9mo agoVery, if only because you'd have said I'm not sure how impressed I should be about saving 4.5 MB these days not all that long ago. Remember when emacs was backronymised to 'eight megabytes and constantly swapping'? That was also not all that long ago. Now 8 megabytes is what some pissant JS library takes as part of some miserable npm package used to bellyflop an ad into your browser window.
- ensocode 9mo agoBe as impressed as you want but I think it is a very good sign that developers are taking care of it, and as this is a free to use product we can always be happy if someone boosts performance no matter how much
- db48x 9mo agoThat’s the wrong way to look at it. Improving the performance of a complex piece of software is not something you do in one fell swoop, or even in a dozen smaller steps. It’s a job of compounding many tiny single–digit percentages over years, and of carefully avoiding performance regressions.
- nicoburns 9mo agoBrave'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.
- nineteen999 9mo agoAt risk like node/npm with all the supply-chain attacks then? Or is there something that cargo does to manage it differently (due diligence?).
- Jalad 9mo agoSupply-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
- ashishb 9mo ago> 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 https://deps.dev/npm/react/19.2.3 Can anyone even review it in a month? And they publish a new update weekly.
- ComputerGuru 9mo agoIs that 45 MiB per-tab? People are laughing it off, but since each tab is a process these days..
- mccr8 9mo agoEach tab can be a dozen or more processes nowadays, thanks to site isolation.
- goku12 9mo agoThose may be forked copies of the main adblocker process. If so, you'll get the benefit of CoW page deduplication.
- ComputerGuru 9mo agoWindows (sanely) doesn’t do fork. Shared memory obviously exists, though and they do mention in the post (missed it first time around) that they try to share Adblock resources.
- nosman 9mo agoI hope that this is the start of developers being conscious of using resources efficiently again, especially in the browser. The more rust gets written, the better AI will be able to write it for people... I like to be optimistic.
- lifetimerubyist 9mo agoThe adblocker was already written in Rust.
- seemaze 9mo ago>I hope that this is the start of developers being conscious of using resources efficiently again, especially in the browser. AI may have forced the hand on this. Users will no longer be able to subsidize software performance with hardware upgrades due to the great DRAM debacle of 2026..
- quotemstr 9mo ago> I hope that this is the start of developers being conscious of using resources efficiently again, especially in the browser. Me too. > The more rust gets written, Rust seems neither necessary nor sufficient for getting developers to care about memory efficiency again though.
- imron 9mo agoIt is not necessary in a theoretical sense, but in a practical sense developers that care about memory efficiency only have a handful of options. If you also care about memory safety it further limits options.
- smt88 9mo agoI think the Rust part of the headline is incidental in this case. The previous version that used more resources was also written in Rust.
- nosman 9mo agoThis is true, but a team using rust will probably care more about resource use in general. I do agree it's kind of a misleading headline, the real update is their use of Flatbuffers.
- dmix 9mo agoI just found out Brave supports Vertical tabs, https://brave.com/blog/vertical-tabs/ https://brave.com/blog/vertical-tabs/ I might have to try switching from FF...
- FuturisticGoo 9mo agoFirefox 136 supports vertical tabs though
- apparent 9mo agoDo they support nested tabs? Makes visually navigating many tabs so much easier that way.
- grepex 9mo agoUnfortunately not, but it does support tab grouping which I use for basically this reason.Althought you can't do a group within a group.
- aguscruiz 8mo agoNot yet but it's in development (I'm a product designer at Brave). We're working through other issues with vertical tabs before we continue work on this :) https://github.com/brave/brave-browser/issues/44345 https://github.com/brave/brave-browser/issues/44345
- j1elo 9mo agoA great power of Firefox are its add-ons, aren't they? Sidebery [1] has been a solid implementation of vertical tabs since a long time ago. Begore that got popular, Tree Style Tabs [2] was also a very comprehensive solution. But nowadays, vertical tabs are native since Firefox v136 [3][4], so at least for the basics you won't need an add-on. [1]: https://addons.mozilla.org/firefox/addon/sidebery/ https://addons.mozilla.org/firefox/addon/sidebery/ [2]: https://addons.mozilla.org/firefox/addon/tree-style-tab/ https://addons.mozilla.org/firefox/addon/tree-style-tab/ [3]: https://news.ycombinator.com/item?id=41192118 https://news.ycombinator.com/item?id=41192118 [4]: https://news.ycombinator.com/item?id=43254871 https://news.ycombinator.com/item?id=43254871
- apparent 9mo agoFunny that the iOS update notes don't mention this at all: > in this release: > Other enhancements, stability improvements, and security updates No mention of efficiency, or adblocking whatsoever!
- mywittyname 9mo agoIs the iOS version of Brave actually the same codebase? My understanding is that all browsers on iOS have to wrap Safari, which would explain the release notes. But I could be wrong here, as I don't develop for iOS.
- awnird 9mo agoDoes Brave actually block ads now? Or does it still replace them with ads for scanmy cryptocurrency?
- skaul 9mo ago> Or does it still replace them with ads for scanmy cryptocurrency? Brave never did that. Brave blocks third-party ads & trackers by default. (disclaimer: I lead privacy and adblocking at Brave)
- weedhopper 9mo agolead what? https://archive.is/W0k4j https://archive.is/W0k4j (disclaimer: people remember how sketchy Brave is)
- someotherperson 9mo agoThat was just a concept, it never made it to a live build AFAIK. What they should have done instead is just take hundreds of millions of dollars from Google, like a non-sketchy browser.
- fenwick67 9mo agoDon't forget when they took donations on behalf of other websites and kept the money unless the operator went to the "escrow account" to collect it
- ikekkdcjkfke 9mo agoJesus dont you see they are trying atleast an alternative to non consensual anal probes by other ad companies?
- BrendanEich 9mo agoThe grants came from our token fund, not users' tokens (no way to buy BAT then). The issue which I found out about late, and fixed right away, was infringing on right to publicity, nothing to do with donations from users' own tokens.
- drnick1 9mo agoI 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.
- w0ts0n 9mo agoThere 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 https://x.com/BrendanEich/status/2006412918783619455
- drnick1 9mo agoThis 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?
- dfajgljsldkjag 9mo agoOpen 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.
- pavlov 9mo agoIs Brave still a front for a cryptocurrency pump-and-dump scheme?
- OhioMan2943 9mo agoNever was.
- avazhi 9mo agoMaybe not for crypto, but they did spend a year or two surreptitiously installing their own VPN service on your Widows machine without any opt-out ability, and then failed to remove it, its Windows service, or multiple scheduled tasks once the brave uninstaller had been run. The best part was this whole scam sitting as an unresolved issue on GitHub for months after they finally acknowledged it (after first denying it lol). Closest browser I’ve seen to an actual virus in maybe ever. And it’s a good lesson for developers that once you lose trust there are many of us who will never make the same mistake again purely out principle.
- stock_toaster 9mo agoplenty of other issues though: https://news.ycombinator.com/item?id=18734999 https://news.ycombinator.com/item?id=18734999 https://www.sophos.com/en-us/blog/brave-ceo-apologises-for-adding-affiliate-links-to-urls https://www.sophos.com/en-us/blog/brave-ceo-apologises-for-a... https://www.bleepingcomputer.com/news/security/facebook-twitter-trackers-whitelisted-by-brave-browser/ https://www.bleepingcomputer.com/news/security/facebook-twit... and issues with tor (presumably fixed by now) https://www.coindesk.com/tech/2021/02/22/brave-browser-was-exposing-addresses-in-tor-mode-for-months https://www.coindesk.com/tech/2021/02/22/brave-browser-was-e...
- upcoming-sesame 9mo agoI like Brave but the only thing that keeps me from using it on mobile is the lack of extension. That's why Firefox is my daily driver on Android
- w0ts0n 9mo agoits coming. https://x.com/brave/status/2008244198060028063 https://x.com/brave/status/2008244198060028063
- Slapping5552 9mo agoI recently switched over from FF on Android to Brave. It is much faster, and although extensions are missing, it has a bunch of built in features that covered my use case: - Forced Dark mode - Ad blocking
- sbt567 9mo agoRecently I've found Cromite and sure glad I did! Finally I've found my Kiwi browser replacement. It is also feels faster than both Firefox and Brave on Android (though YMMV).
- avazhi 9mo agoAnd here I am on IOS where Brave but not Firefox can use adblockers. My fucking god I’m not sure enshittification has ever been so widely dispersed. It’s impossible to have any type of unified set up across different OS/devices currently.
- ThierryBuilds 9mo agoI am curious to know what was the contribution of switching to FlatBuffers in that improvement.
- antonok 9mo agoFlatBuffers was definitely the majority of the improvements here! On 64-bit systems, pointers themselves can really start to take up a lot of memory (especially if you multiply them across 100k+ adblock filters). Switching to array indices instead of pointers saves a lot of memory that's otherwise wasted when you don't need to address the entire possible memory space.
- ThierryBuilds 9mo agoInsightful. Many thanks. Flat buffers is know to bloat client code. Was any trick used to mitigate that?
- never_inline 9mo agoI guess code bloat is proportional to schema complexity, and performance improvement is proportional to volume, so in ad blocker with many large block lists the latter dominates.
- jeffreygoesto 9mo agoThe biggest improvement for us was deduplication by using generators an referencing already emitted objects. Don't run flatc on a JSON, it doesn't do that.
- ReptileMan 9mo agoWell brave still uses 300MB per tab on linux and almost 700MB per tab on Windows. So they do have a long way in front of them.
- eYrKEC2 9mo agoThey're crushing it on ad-blocking. I love it for that reason.
- tredre3 9mo agoThat's an absolute lie. The entire browser uses around 400MB when a single tab for news.ycombinator.com is open. The tab itself sits at around 35MB. Additional tab increases by the same amount. https://imgur.com/a/nNA90lk https://imgur.com/a/nNA90lk
- deleted 9mo ago[deleted]
- KnuthIsGod 9mo ago[flagged]
- VladVladikoff 9mo agoIs Brave actually a good browser now? Did they rewrite it or something? Last time I looked it was a janky JavaScript mess.
- eYrKEC2 9mo agoThe most effective ad blocker I've ever used. With that, it becomes better than chrome, in my opinion. Give it a spin, it's my daily driver for web dev as well ( just chrome debugger)
- tredre3 9mo ago> a janky JavaScript mess. You might be thinking of Vivaldi. Brave is certainly buggy, but it's not written in Javascript.
- VladVladikoff 9mo agoThe project is listed as 100% JavaScript on github https://github.com/brave/brave-browser https://github.com/brave/brave-browser
- mrbn100ful 9mo agohttps://github.com/brave/brave-browser https://github.com/brave/brave-browser >This repository holds the build tools needed to build the Brave desktop browser for macOS, Windows, and Linux. The web browser is here : https://github.com/brave/brave-core https://github.com/brave/brave-core (8% of typescript)
- bluecalm 9mo agoIt's better Chrome: no ads, faster (because no ads), some nice features on top. What's not to like?
- goodpoint 9mo agoit has a lot of sketchy telemetries
- 7e 9mo agoWhy don't they put these ads behind a Bloom filter? That's a lot of memory use, even with FlatBuffers.
- skaul 9mo agoWe used to use Bloom filters in 2019, funnily enough: https://brave.com/blog/improved-ad-blocker-performance/ https://brave.com/blog/improved-ad-blocker-performance/
- avazhi 9mo agoBrave also installed a VPN an a VPN service without permission on my Windows machine, and then didn’t disable or remove 3 separate scheduled tasks in Windows Scheduler once I’d uninstalled it. The VPN issue was open for like 8+ months on GitHub too - and at first they denied doing it at all. For all I know it still installs it, but I removed this malware-type shit when this all happened so I couldn’t tell you. I’ll never trust them again after that.
- jorvi 9mo agoYou've commented this three (?) times under this HN post and several times on this site now. Sure seems like you have a bone to pick. The VPN they installed was disabled and they could not activate it without user interaction. And the only reason they did this is so when you click "activate VPN" in the browser, it works immediately. On top of that, other businesses employ(ed) similar tricks. For years and years and years, Dropbox on macOS did a very specific hack to give itself more permissions to ease syncing. Hell, Firefox injected ads for Mr. Robot via a surreptitiously installed invisible extension. Still a boneheaded move by Brave, just like adding their own affiliate link to crypto links (if none were added) to generate extra revenue for the company at no extra cost to the user. But that is even further in the past. At any rate, they also fund or develop a bunch of anti-ad tech and research and make it open source / publish it. The defaults of Brave protect your privacy much better than Firefox's defaults. And so far, their BAT concept is the only one that is a legitimate alternative to an ad-funded internet. Brave is everything Mozilla wishes it had become.
- avazhi 9mo agoMinimising a browser installer surreptitiously installing an unrelated network service without my consent in the name of convenience and then pulling out a whataboutism that has nothing to do with this. Not even gonna bother reading the rest of your comment. And yeah, my bone to pick is warning others not to fall for Brave’s slick PR. Companies that act that way can pay the price.
- deleted 9mo ago[deleted]
- mocmoc 9mo agoI haven't seen an ad nor in iOS nor in Mac since I installed brave. The browser, for me , works perfect
- hellohihello135 9mo agoThe number of journalists in the US has dropped by something like 80% in the last 20 years. But sure, enjoy your ad free experience!
- HendrikHensen 9mo agoWhat were you using before that? I never see any ad in Firefox with uBlock Origin. I can't imagine it's much of a difference experience than with Brave.
- dowakin 9mo agoThe Brave is the reasons why I can tolerate iphone )
- doe88 9mo agoWhy don't Mozilla make or use such engine in its browser? Make something really native for dealing with ads and annoyances. The irony is Brave smartly uses Rust which were forsaken by Mozilla. I know Mozilla seems to have something for ads but honestly I don't even know what it really does, beside its shield icon.
- snowram 9mo agoBecause ad blocking isn't provided by default in Firefox. It isn't as opinionated as Brave, for the better and the worse.
- viraptor 9mo agoBecause Mozilla is mostly sponsored by Google.
- gkbrk 9mo agoAlmost all of Mozilla's money comes from Google, an ad company. Mozilla wouldn't want to bite the hand that feeds them.
- Foriney 9mo agoMozilla wants Firefox to be a mainstream browser that anyone can use. Ad blocking introduces the risk of site breakage, and the majority of the population don't have the knowledge to deal with it. This is what Firefox blocks by default: https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop#w_what-enhanced-tracking-protection-blocks https://support.mozilla.org/en-US/kb/enhanced-tracking-prote...
- rohin15 9mo agoIt's getting harder and harder to main Firefox. Brave's split tab feature is simple but so brilliant.
- goku12 9mo agoThe 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.
- Izkata 9mo agoA decade ago there was a Firefox addon called Tile Tabs that could do any number of arbitrary splits. It died along with all the old-style XUL addons.
- Dah00n 9mo ago1. Look for a new browser instead of Firefox that also have a history of being trustworthy. 2. Look at Brave - see 1.
- SavioMak 9mo agoFirefox has experimental split tab hidden inside about:config since 146.0 (December 9, 2025) https://winaero.com/how-to-enable-split-view-in-firefox-146/ https://winaero.com/how-to-enable-split-view-in-firefox-146/
- nialv7 9mo ago162 to 104 is not 75% reduction... Who calculates reduction percentage like that?!
- roelschroeven 9mo agoI'm guessing the same kind of people who don't understand the difference between 0.002 dollars and 0.002 cents (http://verizonmath.blogspot.com/2006/12/verizon-doesnt-know-dollars-from-cents.html http://verizonmath.blogspot.com/2006/12/verizon-doesnt-know-...).
- llm_nerd 9mo agoTo be fair, they claim the adblock engine saw a 75% reduction in memory usage, and in the images they're showing the main browser process generally (I assume? I don't use Brave), or which the adblock engine is only a part but had a substantial impact on usage.
- jonkoops 9mo ago"Brave has overhauled its Rust-based adblock engine to reduce memory consumption by 75%" This only claims that the memory usage of the adblock engine was reduced, not the total memory consumption of the browser.
- Dah00n 9mo agoThey could cut it 110%, so my available RAM grew bigger, and I would still not trust them. They have been caught with their hands deep in the cookie jar too many times.
- johnebgd 9mo agoMeanwhile Firefox keeps undoing its own track record. There really is no perfect solution to browsing the web these days.
- jhoho 9mo agoCan you elaborate?
- TiredOfLife 9mo agoThat's not how fud works
- afavour 9mo ago> In 2020, the company was found to be appending affiliate referral codes to the end of certain cryptocurrency exchange URLs typed into the browser's address bar. The practice applied to exchanges such as Binance and Coinbase, and was later discovered to extend to suggested search queries for terms like "bitcoin" and "ethereum". > In 2022, Brave faced further criticism for bundling its paid virtual private network (VPN) product, Brave Firewall + VPN, into installations of its Windows browser, even for users who had not subscribed to the service https://en.wikipedia.org/wiki/Brave_(web_browser)#Privacy https://en.wikipedia.org/wiki/Brave_(web_browser)#Privacy
- methuselah_in 9mo agoBut why not use Firefox with ublock? Brave is also chrome beneath. If google pulls the plug what is brave or other browsers anyway?
- coffeeling 8mo agoChromium is still markedly ahead of Firefox on security, especially on mobile.
- kvemkon 8mo agoPerhaps it's obvious but I'm missing some (briefly) justification why FlatBuffers was better, not Protobuf/Capnproto/...