News for hackers. Stuff that matters.
Re:Chrome Canary just killed uBlock Origin and other Manifes... by Arnt on Sunday October 06, 2024 @12:00PM (#41758007)
I have heard that the real underlying problem concerned resource usage (ten thousand regexp matches etc). But only now do I wonder why the browser's reaction is to remove an API instead of to limit the amount of CPU extensions can use.
Re:Chrome Canary just killed uBlock Origin and other Manifes... by grobbyy on Sunday October 06, 2024 @12:57PM (#41758452)
The browsing experience is dramatically faster with uBlock. The thousands of regexps don't come close to the CPU or memory load of ads.

A 386 could handle a regexp fine. Compare that to audio or video decoding for ads. Not the same ballpark by orders of magnitude.

It's dead because Google makes money from ads. I shifted to Firefox ages ago.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by Arnt on Sunday October 06, 2024 @08:23PM (#41761595)
I traced the CPU usage on my wife's laptop many years ago. That wasn't a fast machine, but it wasn't a 386 either. The ad blockers were her performance problems, alone.

If the browser maintainers have seen a couple of machines with similar problems and maintainers of regexp-using add blockers simply insisted that their code was fast, "a 386 could handle" etc, I can easily see how the browser maintainers might lose patience. Don't need to assume ill will.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by grobbyy on Saturday October 12, 2024 @09:11AM (#41818805)
My comment wasn't that every ad blocker was performant. My comment was about uBlock specifically.

My comment wasn't that all algorithms are always efficient. It was that properly compiled regular expressions are.

Extensions often lead to performance issues.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by Gigachad on Sunday October 06, 2024 @06:47PM (#41761001)
uBlock is one of the good ones, but for the rest of extensions, the majority of them are literal malware. Usually originally developed by someone decent, and then sold off to someone else who uses them maliciously.

It looks like the recent changes are all about slowly locking down what extensions can do because it’s currently a free for all where random anonymous extension owners have full access to everyone’s browsers.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by ragnese on Friday October 11, 2024 @04:08PM (#41813173)
> It looks like the recent changes are all about slowly locking down what extensions can do because it’s currently a free for all where random anonymous extension owners have full access to everyone’s browsers.

The major browser vendors already have extension "stores" that are supposed to be curated. I believe it's also true that installing an extension directly ("side-loading") is usually disabled by default (or just not an option at all).

They've done their due diligence for our "safety". Now, it's just bullshit to prevent us from blocking ads, trackers, and spyware.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by HumanOstrich on Wednesday October 16, 2024 @06:24PM (#41864459)
They aren't "curated" at all, and malware regularly slips through.
Re:Chrome Canary just killed uBlock Origin and other Manifes... by ragnese on Thursday October 17, 2024 @03:27PM (#41872932)
Firefox's are, nominally, reviewed. I don't know if Chrome's are, but I would've assumed that they are- even if by some automated tool(s).

Granted, I'm sure malware slips through. But, what security danger is there to a user if an extension blocks a network request? Manifest V3 eliminating the ability to block network requests is NOT for user security. The absolute best excuse they can come up with is that it has something to do with performance, but that's also bullshit because I'm 99% sure I can find plenty of ways to make a Manifest V3 extension waste CPU and/or memory.

Re:Chrome Canary just killed uBlock Origin and other Manifes... by HumanOstrich on Friday October 18, 2024 @07:22AM (#41878335)
I agree with you on everything except word choice. Standard review processes are far from what I think of as curation.
Re:Chrome Canary just killed uBlock Origin and other Manifes... by gorhill on Monday October 07, 2024 @09:24AM (#41765763)
No competent content blocker tests "ten thousand regexp matches" for each request URL to match, this is not how it works.

To simplify, and speaking from uBO's perspective, consider that nine distinct tokens can be extracted from the URL in the address bar for the current webpage:

  https
  news
  ycombinator
  com
  reply
  id
  41758007
  goto
  item%3Fid%3D41757178%2341758007
To match such URL against the tens of thousand of filters, there is only a need to lookup filters for these nine tokens, and for most of these tokens there won't be any filters to test, such that in the end for any given URL only a few to no filters will end up being tested, and the majority of these filters are not regex-based, they are just plain string matching.

This is the overall simplified explanation of how it really works, in reality it's a bit more complex because there are a lot of other optimizations on top of this.

There is a built-in benchmark tool in uBO, accessible through the dashboard, _Support_ pane, _More_ button, _SNFE: Benchmark_ button[1].

When running the benchmark against a set of 230,364 URLs, I get an average of 11-12 µs per request to perform a match test against the default filter lists in uBO.

* * *

[1] https://github.com/gorhill/uBlock/wiki/Advanced-settings#ben...