Live data from Hacker News

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

bugzilla.mozilla.org

281–290 of 443 posts

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

#281

Earlier quoted context omitted.

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

To save another search: On desktop and mobile devices: While playing a video, select the Settings button. Locate the Ambient Mode setting in the list of preferences. Toggle it to off to disable Ambient Mode for all videos on YouTube (in that browser). It's in the same popup used for video quality and playback speed.

For those who may be wondering, the Settings button referred to here is the gear button in the Youtube video player.

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

#282

Earlier quoted context omitted.

Where is that setting? In YouTube Settings? I don't see it, there.

It's not in the general settings - instead it's in the setting menu in the video player itself, where you'd select the quality and playback speed, etc.

its not there for me. I dont see it in any settings anywhere.

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

#283

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 energy savings if Firefox users switched to Chrome.

Imagine the energy squandered on all the extra goods and services bought by users using a browser owned by an advertising company, instead of Firefox.

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

#284
post #263
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…

as I don't care about the comments section or the recommender algo, I search (youtube-fzf) and launch (yt-dlp + mpv) youtube videos directly from the terminal. i have a bash pipeline for this and, naturally, it is very resource efficient

post the script pretty please

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

#285

Earlier quoted context omitted.

It's not in the general settings - instead it's in the setting menu in the video player itself, where you'd select the quality and playback speed, etc.

its not there for me. I dont see it in any settings anywhere.

I don't see it either, maybe it's on an A/B rollout for desktop.

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

#286

Earlier quoted context omitted.

To save another search: On desktop and mobile devices: While playing a video, select the Settings button. Locate the Ambient Mode setting in the list of preferences. Toggle it to off to disable Ambient Mode for all videos on YouTube (in that browser). It's in the same popup used for video quality and playback speed.

For those who may be wondering, the Settings button referred to here is the gear button in the Youtube video player.

for those unfamiliar with visualising a gear, seek the doughnut with a notched circumference

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

#287
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…

I completely agree with you and have been on the other side of this too, having worked on a native enterprise app running on various MacOS, Windows, iOS and Android versions. Customers don't care if you have a great explanation why stuff with your app doesn't work. That being said, it's completely unreasonable to have the proactive expectation of something working well today (writing many files) breaking tomorrow (due to defender heuristics changing) and proactively trying to prevent this by optimizing. Mozilla reacting to this by both reporting the bug to Microsoft and optimizing to work around the problem is really the best you can do.

"They shouldn't have written so many files in the first place" is not a valid preventative strategy, but a one way road to premature optimization hell.

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

#288

Earlier quoted context omitted.

Neat idea, I bet the intern had fun implementing it, why was it on by default?

Because the target audience for the feature is not tech savvy people but common users whom won't know it exists until it is shown to them/might be intimidated to delve onto FF settings If you are tech savvy, you are then expected to be able to "bear the burden" of turning the feature off if it bothers you

Hell, I'm tech savvy - not a tech worker, but you'd better believe that you want me to be your end-user contact, I know a hell of a lot more than the people I work with - and I didn't even know this was an option. I'm not afraid of fixing FF settings, done it plenty of times. It's on by default. If someone who can install OpenBSD and make it a router for DSL over PPPoE in 2001 (side job) doesn't even know it exists and eats cycles [i.e., a "prosumer", not an expert, but not too far below a new hire and well beyond the masses), it's a bad idea. I don't have time to stay up on every way that people want to eat my electricity. I do know that YouTube spins up the fan on my iMac with disturbing regularity in a way that videos from alternative sources do not. So it's not the decoding.

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

#289
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…

Where is that setting? In YouTube Settings? I don't see it, there.

If you use uBlock, add the following to the filters:

  youtube.com###cinematics.ytd-watch-flexy

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

#290

Earlier quoted context omitted.

> Are you sure you want to invoke this logic? Because following it through imagine the energy savings if Firefox users switched to Chrome. Ironically, Mac users routinely complain about how power-hungry Chrome is on the Mac. Safari is significantly more efficient.

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.

Totally guesswork here, but I'd say Chrome has a lot more telemetry, profiling and tracking built-in and its users tend to use a lot more plugins, including things like ad-blockers that scan over each webpage and can be beneficial (battery-wise) or not depending on content. Safari users are more of a barefoot type. A power user is more likely to not be running Safari. And a power user may, well, prefer to sacrifice battery power to get the power they seek.

Besides, there's some precedent set in 1998 by a certain OS that "favored" their embedded browser over the competition, so I doubt Apple would want to tickle that fancy.

Post reply on HN