Atrocious CPU looping fixed with NextDNS (and disabling ad blockers)

In the last few months, I started getting terrible performance when opening a new Safari window. I noticed it in particular with a YouTube video. iStat Menus would show 500% cpu loading for 10-12 seconds when I went to www.youtube.com. During that time, the UI was unacceptably sluggish.

It had never occurred to me that this was a problem with the ad blockers. However, when I installed NextDNS, I was able to disable ad blockers – and get my snappy performance back. I thought that my M1 MBP was rotting away; it’s not back to the crisp responses of a brand-new machine.

OTOH, NextDNS is a bit rough around the edges. When I want to add a domain to it’s “include” list, I often have difficulty logging in. A red square will show up when I go to my.nextdns.com; I must flush the nextdns.com cookie to get past that. I wouldn’t want to go through the complexities of cookie management to have some newbie grapple with this product, but, for me, it’s just fine.

Do any of the Take Control books thoroughly discuss NextDNS? Asking for any newbies I refer to that service. I searched for the term on the website but didn’t see anything.

What ad blocker(s) are you running?

I run Adblock Plus on Firefox, with 9 filter-list subscriptions. I also enable its “advanced tracking protection” with its “standard” settings. I haven’t found any significant slowdown.

Perhaps you have added too many different filter lists. Or perhaps you should consider using a different ad blocker.

Ghostery and DuckDuckGo. I could imagine things being 2x or even 5x slower; I can’t imagine them being 200x-1000x slower. Do you have an explanatory model – some reason why there would be exponential degradation? If so, please tell us. Is this documented somewhere?

Why? The NextDNS filter is working perfectly fine to kill the ads. My only wish is there were a way to temporarily disable the entire mechanism. I could do that with edits to my DNS config, but it would be nice to have a simple GUI way to flip that on and off. I’m guessing they’ll get to that at some point in time. No biggie.

I’m not familiar with these two products, but ultimately ad blockers work by filtering and/or modifying every URL and all HTML content processed by the browser. Depending on how many patterns it is processing and how efficient the code is at applying them, I could see exponential degradation.

The fact that you were running two different ad blockers at the same time might also have an impact. They might be interacting with each other in a way resulting in this kind of slowdown.

Well, that’s one of the reasons I choose to use a browser-based filter instead of a DNS-based filter. So I can configure it to be enabled/disabled on a per-site (and if necessary, per-page) basis.

I want to be able to allow ads on sites that I want to support and whose ads don’t get in my way.

WRT being able to quickly switch your DNS configuration, have you considered using the Location manager?

In the Network system settings, you can define multiple locations:

Screen Shot 2023-01-10 at 14.56.50

You can set up different network configurations for each location (e.g. with ads and without ads locations, that differ only in their DNS configuration). Once that is done, you can use the Apple menu to select the location you want:

Screen Shot 2023-01-10 at 14.55.35

This should let you change your DNS configuration without having to dig through system settings every time.

1 Like

Of course it’s obvious there’s an interaction. OTOH, I’ve never seen any warnings about that: I knew my machine was unhappy but had not idea of the cause. That’s why I was oping there would be a Take Control Book that thoroughly covered this topic – all about the straigh ad blockers, and all about the DNS-based ad blockers.

Of course. NextDNS allows per-domain modification of the allow and exclude lists.

Nope. That’s a good idea. It could allow for quick changes. Right now, I just pick up an iPad to get a different config.