Live data from Hacker News

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

bugzilla.mozilla.org

111–120 of 443 posts

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

#111

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.

> let's assume the bug wasted 5 extra watts 4 hours a day. How did you come to this?

Great question. Based on my use, it would be a lot more than 5 watts/day.

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

#112

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.

Don't underestimate Microsoft Won’t Fix which helped IE dominate the browser market for over a decade.

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

#113

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.

I love calculations like this and hope they are part of every engineer’s line of thinking. I originally came across this thinking in Andy Hertzfeld’s book - https://www.folklore.org/StoryView.py?story=Saving_Lives.txt Performance is time, energy, heat. It’s one of the easiest features to get and there are lots of tools, research, and philosophies to help get it. Memory and storage are similar. For anyone working on l…

Don't forget the waste caused by people throwing away devices that are "too slow", and the resources required to build new computers/phones.

Somewhere I saw a rough figure about phones. Something like: if everyone was able to keep their phone one year longer, it would be the equivalent of 600,000 cars off the road or something. (Just looked it up - source is possibly the founder of iFixit).

But you know, development velocity or whatever.

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

#116
post #9

That's one way to look at it, but a very biased take. An equally valid take is that Firefox was calling an expensive platform feature too often, and even though it has been killing performance for years (possibly, for the entire history of the project) nobody noticed or bothered to fix it on the application side.

I'm not sure how you can possibly qualify VirtualProtect as "an expensive platform feature". Looking at the operation that VirtualProtect actually has to perform, from first principals, it should be one of the cheapest syscalls in the entire kernel.

The bug was that ETW (in the antivirus process) was doing something braindead; zeroing a megabyte of memory unnecessarily every time someone called it just to get the size of a buffer.

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

#117

Earlier quoted context omitted.

You assume all Firefox users are on Windows (they're not) and that all Firefox users on Windows are affected (I and my SO were not). Who knows what edge case triggered that bug to manifest but I for one haven't seen it in the wild in the years we've been using FF. Probably difficult in such a large org to allocate dev resources to chase down and fix a bug few people were impacted by.

Around 80% of Firefox users are on Windows, per https://data.firefox.com/dashboard/hardware That same site also suggests that Firefox has around 200e6 monthly active users, the average user uses Firefox 3.5 days a week, and for 5.5 hours per day. My math could be wrong, but taking the above into account, and arnaudsm's 5 W estimate, I come up with an upper bound of around 80 MW. Discount that further by whatever prop…

Wow, that's fascinating. It really speaks to the utter dominance of Windows over Linux more than anything else. Like even among Firefox users, as of last year, there were an order-of-magnitude more Windows 7 and 8 users than Linux 5.x users.

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

#118

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.

user must be running windows

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

#119
post #50

Earlier quoted context omitted.

If it isn't on the Sprint board it doesn't exist.

You also have to assume that at least one Microsoft employee has Firefox installed. There's no bug if there's no users

I work at MS, tried to use Firefox but couldn't because FF doesn't integrate with the Windows cert store. Crucially, this keeps Windows Hello (TPM auth) from working, which makes it useless for any internal websites. For a while I used a hand-compiled PKCS#12 plugin that bridged to the cert store, but that was extremely fragile and eventually I gave up.

I think this is probably a major blocker for many enterprise users, and wish Mozilla would have fixed it.

edit: it looks like they may have fixed this in the past couple years, though you might have to go poking around in about:config.

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

#120

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.

Post reply on HN