news.volyx.in

Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75% (brave.com)

507 points by skaul · 290 days ago · 274 comments on HN

Article summary

Brave has overhauled its Rust-based adblock engine, reducing memory consumption by 75% and resulting in a 45 MB memory savings. This improvement is expected to bring better battery life and smoother multitasking to users. The upgrade is live in Brave v1.85, with additional optimizations coming in v1.86. The change was achieved by refactoring the adblock engine to use FlatBuffers, a compact and efficient storage format.

Main themes

  • Browser performance
  • Memory optimization
  • Adblock engine
  • Rust programming language
  • Software efficiency

What commenters say

  • The 45 MB memory savings is negligible on modern systems with ample RAM, and may not have a significant impact on performance.
  • The memory savings may add up when considering multiple apps and services, and can have a noticeable impact on lower-end devices.
  • Optimizing software for performance is an ongoing process that requires continuous effort and attention to detail, and even small improvements can be valuable.
  • The use of dependency management systems like npm can introduce security risks, such as supply-chain attacks, which can be difficult to mitigate.
  • Auditing dependencies is crucial to ensure security, but it can be a time-consuming and impractical task, especially for small companies or individuals.
  • The complexity of modern software and the large number of dependencies can make it difficult to achieve reproducible builds and ensure security.
  • Some argue that the memory savings is a significant achievement and a testament to the developers' attention to detail, while others see it as a minor improvement.
  • The discussion highlights the trade-offs between performance, security, and complexity in software development, and the need for careful consideration of these factors.