Live data from Hacker News

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

bugzilla.mozilla.org

231–240 of 443 posts

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

#231
post #181

Earlier quoted context omitted.

This seems unnecessarily passive aggressive. Everyone makes mistakes or bugs, intern or not. It makes no sense to get this salty about basic human error. Also there's nothing wrong with implementing minor UX enhancements. If anything redirect the frustration to the leadership that doesn't prioritize fixing these kinds of errors.

I don't think there's any error to fix. It's a feature - casting light from the video onto the UI, using JS, surely takes that amount of CPU. The question of why it is on by default stands - because it's little bit of eye candy, vs people's laptop batteries, CPU that could have been used to get other stuff done faster - so also their time, device thermals etc... I don't think it's just unnecessarily salty to point ou…

IMO the implementation sucks and the feature is questionable. Recently I set the browser to dark mode, which tells YT to also use dark mode, and if I haven't read here I wouldn't know that this is a toggleable feature. It's sad when we can't tell a feature and a bug apart.

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

#232
post #195

Earlier quoted context omitted.

This is one of the myriad reasons why I have a strong preference for Linux.

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,…

I switched to linux. I like it and haven't really had any issues to speak of. Not with sound, video, wifi or any of the other things people complain about. My fan went, but likely it was a pet fur issue, and easy to fix... I'm not an admin. I know how to use the command line, and how to use it as a work machine. Really my experience over the past 3 years, its been as trouble free as my Mac used to be. It really is the great development platform.

Glad you like your machine.

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

#233
post #13

Earlier quoted context omitted.

The platform feature in question was normally cheap and just made artificially expensive by Defender intercepting calls to it and blocking until analysis was performed. I don't think it's the FireFox' team's responsibility to be aware of and take into account arbitrary software intercepting system calls.

> I don't think it's the FireFox' team's responsibility to be aware of and take into account arbitrary software intercepting system calls. One of the first, hard lessons I had to learn about web development (like, stare-at-a-wall-and-consider-my-career-hard) is that web development is way more about network effects than application architecture. Real people run systems with real configurations, and when you're target…

Yes, but it’s incredibly difficult to work out what is causing the problem. That’s what happened here.

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

#234
post #143

If you're on a Mac and using FF (probably not FF specific), turning off "ambient mode" in youtube can save 30% cpu. I just found this out while searching why FF was taking 90% of my cpu while watching youtube videos in normal mode, but went down to 40% use if viewing in full screen. Turns out that this youtube "ambient mode" was the culprit. My lap is now cooler and the fan doesn't turn on anymore. I wonder how much…

Similarly gifs and animated emojis in Slack chews up the CPU. Something like 20% at idle before I turned it off.

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

#235
post #143

If you're on a Mac and using FF (probably not FF specific), turning off "ambient mode" in youtube can save 30% cpu. I just found this out while searching why FF was taking 90% of my cpu while watching youtube videos in normal mode, but went down to 40% use if viewing in full screen. Turns out that this youtube "ambient mode" was the culprit. My lap is now cooler and the fan doesn't turn on anymore. I wonder how much…

To save a search: "Ambient mode uses a lighting effect to make watching videos in Dark theme more immersive, by casting gentle colors from the video, into your screen's background."

The "average color" (or whatever it is) could have been pre-computed server-side rather than tiring out the poor innocent client CPUs.

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

#236
post #143

If you're on a Mac and using FF (probably not FF specific), turning off "ambient mode" in youtube can save 30% cpu. I just found this out while searching why FF was taking 90% of my cpu while watching youtube videos in normal mode, but went down to 40% use if viewing in full screen. Turns out that this youtube "ambient mode" was the culprit. My lap is now cooler and the fan doesn't turn on anymore. I wonder how much…

This is one of the myriad reasons why I have a strong preference for Linux.

This happens on Linux too. I was wondering if the weird CPU-hogging flickering was a bug in my compositor (picom) or window manager (i3) or browser (Firefox). Turns out to be a "feature".

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

#237

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.

Here's what's available, requires permissions: - BatteryManager.charging - BatteryManager.chargingTime - BatteryManager.dischargingTime - BatteryManager.level https://developer.mozilla.org/en-US/docs/Web/API/BatteryMana... https://caniuse.com/?search=BatteryManager

Isn't available in Firefox though...

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

#238

Earlier quoted context omitted.

Yes. I mean it took 5 years, but who would count. /s

People care about open Firefox bugs much older than that. Basically any long-lived program will have ancient bugs that never made it onto someone’s todo list.

For example, it only took 20 years (!!) to stop Ctrl+Q from quitting Firefox on Linux. :)

IIRC, a couple of patches did get submitted, but never accepted for unknown reasons.

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

#239

Earlier quoted context omitted.

> 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.

Does Chrome really use significantly less resources than Firefox? Are there numbers there?

According to Tom's Guide[1] Microsoft Edge beats out both when it comes to RAM utilization but Chrome just edges out Firefox when loading >10 tabs. That was in 2021. I'd be interested to see any other comparisons or benchmarks.

1. https://www.tomsguide.com/news/chrome-firefox-edge-ram-compa...

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

#240

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.

Imagine the power savings if chrome users switched to lynx.

Imagine the power savings if everyone used pihole, ublock etc.

Second uses more power than the first and is better. Do it!

Post reply on HN