3 ms·
Is it possible that Apple’s implementation uses less power and hence conserve battery life? Also, is it possible Apple’s implementation requires less trust in
by lotsofpulp 4y ago
Is it possible that Apple’s implementation uses less power and hence conserve battery life? Also, is it possible Apple’s implementation requires less trust in extension and is more private because no browsing information can exit?
It is also possible for the above, and collusion to all simultaneously happen, and or Apple advancing their own ad business.
- the_gipsy 4y agoIt won't be lower battery if ads slip through (they do). It won't be more private if ads slip through, or if the whole web experience is degraded and users prefer native apps.
- kevingadd 4y agoThink about it from a mathematical perspective: How much CPU time is actually spent evaluating ad blocker rules? It's going to be proportional to the number of HTTP requests you issue. On a good website the number of requests is in the dozens or a hundred tops per page load, on a bad website maybe it's in the low thousands. But that's it. Let's say you have 300000 rules (I think the actual number tends to be much lower than this), worst case even if you brute forced that, you're evaluating 300000 regexes maybe a thousand times. That'll take some time, but not that much time, because modern CPUs are really fast. It's simply implausible that an ad blocker could have a significant negative impact on battery life unless you wrote it in some sort of forth interpreter that was checking strings one byte at a time - compared to the rule evaluations happening once per request, you're rasterizing frames ~60 times a second and handling input events and timers and all of that stuff constantly. If you optimize the rules engine - which you can definitely do - you can skip evaluating most of those regexes, you can evaluate them in parallel, etc. You could start preparing the request and only gate the actual tcp packets on approval from the ad blocker. You could cache the approve/deny state for each URL so that the ad blocker overhead is only paid on first visit to a site. There are lots of ways to make this stuff super fast without breaking it, but Google and Apple don't want to do the work. People like the uBlock Origin author have already demonstrated in the past that their ad blockers are fast despite the severe limitations of current browser extension APIs. If browser vendors actually supported extension developers ad blockers could probably become faster. Instead they're attacking them and forcing people to move over to intentionally sabotaged APIs with limited feature sets and arguing that now things will be "faster" even though you're going to be wasting resources downloading a bunch of ads.
- webmobdev 4y agoSure. The content blocking API is more secure as it doesn't allow any code by the extension to run and modify a web page. And so logically sounds like it should use less cpu / power. It is also true that it is a much, much inferior ad-blocking solution. If a feature is popular, it doesn't make sense to remove it. Instead, you can choose to make it opt-in. That both Apple and Chrome haven't opted for that speaks for itself - it is clear that they are prioritising crippling adblockers than letting users control what code run on their browser.
- Shank 4y ago> Is it possible that Apple’s implementation uses less power and hence conserve battery life? On WebKit, you can still use WebRequest to intercept and log all traffic, you just can't block it. I don't think that intercepting/recording all traffic and selectively blocking it would have a meaningful difference compared to just intercepting it all and letting it through.