Live data from Hacker News

Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

bugzilla.mozilla.org

351–360 of 443 posts

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#351

Earlier quoted context omitted.

Is that because of the quality of Chrome or because Safari is a "blessed" application and probably gets to do things other applications do not? Entirely serious question. Apple is known to severely privilege their own applications over competitors.

I would be at least slightly surprised if Apple would deliberately hold back power-saving techniques from third party developers. It’s not like this is something that makes Safari much more appealing to users. Most users wouldn’t even notice that their choice to use Safari is responsible for their great battery life.

Third party developers are free to go here and see what Apple is doing:

https://github.com/WebKit/WebKit

> Most users wouldn’t even notice that their choice to use Safari is responsible for their great battery life.

Seeing that MacOS has called out which apps are using the most energy for years, users can definitely tell which apps are using the most battery life.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#352

Quick napkin math of the wasted power : Firefox has ~300e6 users, let's assume the bug wasted 5 extra watts 4 hours a day. That's 250 megawatts saved, the equivalent of an average coal power plant. Because some Microsoft engineer missed a bug.

While this feels significant, I don't think humanity is doing itself any favors by guilting itself over problems it didn't (or couldn't) anticipate. Hindsight is always 20/20. This is especially true when "don't over-optimize" is a core tenant in software development. Software would never ship in a reasonable timeframe if we scrutinized every release to this degree during development.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#353
post #308
post #245

Earlier quoted context omitted.

With all the attention being paid to macOS these days, there's enough mods and addon's that I don't miss Linux so much on my laptop. Hammerspoon gets me drag and resize windows how I want, and there's Rectangle.app for tiling-ish window management. There's no /proc, and all the rest of the cli utilities are just wrong (netstat, route, top, etc) but I can live with my M1. (brew addresses a lot of the issues though, ev…

> With all the attention being paid to macOS these days, there's enough mods and addon's that I don't miss Linux so much on my laptop. One problem that I have is all that all those mods and add-ons are out there, but there's a real mindset that "everything must be an app" and a pursuant mindset that "might as well charge for it". I don't mind paying for a complicated app, but there are certain basic features that use…

What are you looking for? I don't have anywhere specific in mind, but with hammerspoon I find myself writing lua to write the functionality I want. Which I used to do with Linux. Ideally I'd write up and post it on a blog or github somewhere though.

Personally I'm okay with paying for software (though I do whine about it from time to time). Yeah it should just be built in functionality, but someone devoted their time to building a thing, so I don't begrudge them a couple bucks for it - so long as it's a one-time purchase and not a recurring subscription model for unchanging functionality.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#354
post #195

Earlier quoted context omitted.

I just bought a Macbook because my dedicated Linux laptop, made by a popular Linux-only manufacturer, had so many issues that I got tired of diagnosing. I love Linux, but it's not a panacea for every computer issue under the sun, just a few of them. I, personally, am stoked I no longer have to deal with issues with this new machine, and can just take it into a Genius bar appointment to let someone else deal with it,…

You are not sellout but just the average Joe. No problem with that I guess. Have fun with your Mac that uses a soldered ssd that when failing makes your whole Mac useless as well.

Nice part is that I have a warranty for hardware failures! The big issue I have initially is getting used to not having quite as much control over the OS level stuff like Linux, but I was avoiding even using my Linux laptop, so any improvement on usability will get me more productivity than having full control of every aspect of my computing. Maybe someday I’ll have time like I did when I was young, but until then I just prefer to have everything work together seamlessly, as things should in 2023. Apple offers that kind of support and service for a price I’m willing to pay.

Being an average Joe is fine with me.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#355

Earlier quoted context omitted.

>Safari is significantly more efficient. Based on the increased laptop battery life I notice, so is using Edge on Windows. It makes sense that both Apple and Microsoft can extract the best out of their OS + browser. There's no way Firefox can compete on such OS specific optimizations.

> so is using Edge on Windows. The new Edge based on Chromium performs better than Chrome with regards to power consumptions. The old Edge was even better in terms of power consumption. Like a few extra hours of battery life.

To continue to overextend the analogy though, that's asking people to use Edge over Chrome or Firefox is like trying to market the Smart Car. Few people want to be seen driving it, fuel efficiency be damned.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#357

Earlier quoted context omitted.

Isn't it more like an auto maker issuing a recall to fix an injector issue in all their cars?

An analogy can only get you so far, but in this case the bug is caused by Microsoft Defender, yet Firefox, the car manufacturer, is a different entity. So I wouldn't call it a recall.

> but in this case the bug is caused by Microsoft Defender, yet Firefox, the car manufacturer, is a different entity.

Quoting the Mozilla engineer responsible for most of the recent activity on the bug:

"This problem has two sides: Microsoft was doing a lot of useless computations upon each event; and we are generating a lot of events. The combination is explosive. Now that Microsoft has done their part of the job, we need to reduce our dependency to VirtualProtect."

It was also noted elsewhere in the thread that similar, though less severe, CPU impact is seen with other antivirus products.

Microsoft was doing something wrong that made this operation more expensive than it needed to be, but Mozilla is also doing this far more than any other browser.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#358

Quick napkin math of the wasted power : Firefox has ~300e6 users, let's assume the bug wasted 5 extra watts 4 hours a day. That's 250 megawatts saved, the equivalent of an average coal power plant. Because some Microsoft engineer missed a bug.

> That's 250 megawatts saved, the equivalent of an average coal power plant. Because some Microsoft engineer missed a bug. Are you sure you want to invoke this logic? Because following it through imagine the energy savings if Firefox users switched to Chrome.

It works for a single case, but not sure about long term. We still have at least a little bit of competition. All browsers improve because the other ones improve. If we all switched to Chrome or Safari because of the power saving, we'd just get another version of IE monopoly/stagnation which could result in more power wasted longterm.

The optimum is likely somewhere where most people use the currently most efficient solution and others keep alternatives alive and competitive.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#359

Earlier quoted context omitted.

How much can websites determine about the power of the device they're running on? Obviously it'd be a security issue for them to know too much, but it would be nice to be able to progressively enhance the experience for more powerful devices that can handle it, beyond just mobile vs PC. Even just knowing whether a device was running off battery power could be useful.

I don't think you really want websites to make this determination anyway. There are a million reasons why a user might want a website to use fewer resources than their machine could support. It should just be a setting the user can select. No probing of the machine necessary.

What should be a setting? This specific youtube ambience thing? That is, but it shows the issue - you need to pick a default, and most people won't know they can change it. Having some idea of the capabilities of the device you're running on could allow you to choose sensible defaults.

But if you mean there should be a setting in the browser that websites could check, I agree that could be better.

Re: Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%

#360
Guess that's why I never feel firefox laggy but others said it is. The first thing I do after installing windows is always installing some other antivirus to disable defender. Because the defender start routine scanning at weird time and lag games randomly, which is really annoying.

I really have no clue why engineer at ms think such behavior is ok. Shouldn't scans like these scheduled at some time slot that people are not actively using computers?

Post reply on HN