Live data from Hacker News

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

bugzilla.mozilla.org

151–160 of 443 posts

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

#152

Earlier quoted context omitted.

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

Current MS employee here. For a time this was true, but FF recently added this integration. No about:config needed, there’s simply a checkbox under the FF security settings. Since this was added, I have gone back to using FF as my daily driver, and I haven’t really encountered any other friction.

Indeed. https://support.mozilla.org/en-US/kb/windows-sso

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

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

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

#154
post #13
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.

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.

It's the application owner's responsibility to make it the app run as best as it can on a given platform. Platforms are messy, but you have to deal with it. You should escalate to the platform owner, sure, but you can't rely on them fixing it in any reasonable time-frame.

I worked on a desktopcloud file sync app. On Windows, only one badge can show up on a file's icon in Explorer. If there's multiple apps trying to set the badge, who wins? Well, it depends on the lexicographical order of the registrants names. So what did we do? We added some spaces to our registration name to make them show up first. Good for the user, as best as we can know - since the user or their admin had to install the app to get these badges in the first place. And they were useful ones too - whether a file was synced or not. We tried our best, and escalated.

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

#155
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 has nothing to do with macOS vs. Linux, though

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

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

not sure what your point is... ambient mode is a visual effects thing YouTube does and reading the descriptions, not surprised it causes increased CPU usage regardless of OS.

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

#157
post #55

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.

> the equivalent of an average coal power plant Produces in an hour, four hours?

I'm pretty sure you're mistaking power for energy. Watts are units of power, which is the rate of change in energy (joules per second). Asking for how much power something produces in an hour is like asking how many miles per hour your car goes in an hour.

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

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

They went for copying philips ambient lights on tv's but with software, what could go worng

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

#159
post #73

Earlier quoted context omitted.

You really shouldn’t assume anything in software or any complex system. I know this wouldn’t fly at my job, and I don’t work at Mozilla. This is basic testing. Normally this is the mark of a bad software engineer, but attempting to blame the platform you’re on for your lack of testing takes it a to a new low. Mistakes happen, admitting full incompetence that basic testing isn’t done is damning. This is not a good def…

Not sure what your job is, but in my job: - we implement a feature, test it thoroughly for functional and non-functional requirements - when we are happy, we release it I don't see myself being responsible for a third party software company coming along years later and introducing a bug in code that injects itself between my software and the operating system that users of the software I wrote happens to install at so…

You basically just said you stop supporting things once they ship. Doesn’t work properly on Windows? Shrug.

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

#160

Earlier quoted context omitted.

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…

How did the idea of avoiding premature optimization get misapplied to client-side apps where the entity writing the software is not the one paying for electricity, cooling, and people's time when the software takes much longer to run than it could? When did a lot of software devs stop caring? Pardon me, I think there are some electron devs at my door asking for a word. They might have baseball bats.

I use a 7 year old low-power laptop. Cooling, electricity usage, and performance of Electron apps are never an issue. Crashes, bugs, lost data, and bad usability still are. I’d rather have devs spend time on that stuff.

If Electron frees up organizational resources to do what’s actually important, I applaud devs for using it.

Post reply on HN