Live data from Hacker News

Firefox engineers discover a Windows Defender bug that causes high CPU usage

bugzilla.mozilla.org

81–90 of 223 posts

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#81
post #67
post #4

TL;DR: Windows Defender had a bug that made certain system calls expensive on CPU cycles when Defender's Real-time Protection feature is enabled. After discovery, Mozilla reported this issue to Microsoft. Microsoft is releasing a patch that should result in lower CPU usage when using Firefox on sites like YouTube (a ~75% CPU usage reduction was noted when browsing YouTube in Firefox with the fixed version of Defender…

I'm curious how much excess energy has been consumed, and won't be consumed any longer, as a result of this improvement - even just limited to reduced CPU usage on Windows machines using Firefox to watch Youtube. I love thinking about the impacts of tiny improvements at scale like this, might do some napkin math on it later and see if I can come up with something in the right order of magnitude.

firefox browser share is teeny tiny these days

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#82
post #81
post #67

Earlier quoted context omitted.

I'm curious how much excess energy has been consumed, and won't be consumed any longer, as a result of this improvement - even just limited to reduced CPU usage on Windows machines using Firefox to watch Youtube. I love thinking about the impacts of tiny improvements at scale like this, might do some napkin math on it later and see if I can come up with something in the right order of magnitude.

firefox browser share is teeny tiny these days

Teeny tiny multiplied by 7 Billion by 365 days per year by 24 hours per day by a fraction of a kW does add up.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#83
Every security app seems to have problems like this all the time, and they never seem to be able to detect them themselves. Security software that didn't suck would be a huge opportunity, and yeah as others have alluded too, a huge carbon emission reduction!

I had two different IT mandated apps taking up a total of 3.5 complete CPU cores for a week before I undocked and noticed the fast battery drain. On an M1 no fan blast to alert me. It's a terrible terrible state of affairs.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#84
post #34

Earlier quoted context omitted.

I've read that a number of times now, but I have trouble matching it to my perceptions. Can you point to a specific website where you notice that slowness and then describe what action is slower? (Initial load, clicking stuff, scrolling, etc.) Just as an example, loading jslinux.org for me in Firefox is about twice as fast than in Chrome. That might be a special case of course, because it is a very special type of wo…

WebGL / Canvas heavy sites are typically significantly slower in Firefox compared to Chrome. Google Maps is a pretty good example of this.

To be fair though, Google maps is an awful beast on any browser compared to older versions.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#85

Earlier quoted context omitted.

It's not just mozilla, been working defender issues for the last few years on thousands of windows vm's. Mostly due to the enabling the more intensive heuristic real time engine and they have different code bases depending on versions installed on different windows builds, and patching does seem to trigger it. For months we had issues where we couldnt log into some vm's due to high cpu for defender, and had to bounce…

I have malwarebytes premium and defender CPU usage is nearly 100% at times bringin Firefox to a halt. Chrome works fine..I've been blaming Firefox so far.

In my experience (as a former Firefox dev), antivirus / antimalware software are really poorly behaved. They tend to:

- require admin rights (which means that if they have vulnerabilities, it can take control of the entire machine, even if Firefox itself is sanboxed);

- monkey-patch the Firefox executable in memory, which works (when it does) as long as the version of the software tracks closely the version of Firefox, which may or may not be the case;

- ... and also decreases the memory-safety of Firefox, which makes it easier to pwn;

- ... and also makes the crash reports unreliable;

- install encryption certificates that are actually less trustworthy than Mozilla's, hence decreasing the security of https;

- block Firefox and add-on security updates, also decreasing security;

- install privileged add-ons, many of which are easy to exploit from any webpage;

- ...

Part of the work on Crash Scene Investigations was attempting to determine whether the crash was in Firefox or in code or in some bogus foreign code. Depressingly often, it was the latter.

In your case, it's entirely possible that malwarebytes was simply untested on Firefox.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#86

Windows Defender is a long standing bug in the Windows operating system. ;) My impression is that its invention was for the sole purpose of eradicating the idea that Windows is insecure and prone to viruses, which explains why it can be overzealous and CPU hungry. I would only enable it for family members who don't know what they are doing. For some reason, I haven't needed any form of active virus scanning in someth…

There's a misconception that you need to do something "stupid" to get a virus which is simply not the case. 0 days exist, and worms are still a thing (looking at you samba). A great example is Pytorch just recently had a supply chain attack, and installing the nightly version between December 25th and December 30th, 2022 - would result in your home directory getting uploaded including ssh keys. Chrome also just had a…

> 0 days exist,

And they're almost exclusively used in targeted attacks against valuable targets, because burning a 0-day to hack grandma's old laptop and steal her facebook password isn't a particularly good investment.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#87
post #67
post #4

TL;DR: Windows Defender had a bug that made certain system calls expensive on CPU cycles when Defender's Real-time Protection feature is enabled. After discovery, Mozilla reported this issue to Microsoft. Microsoft is releasing a patch that should result in lower CPU usage when using Firefox on sites like YouTube (a ~75% CPU usage reduction was noted when browsing YouTube in Firefox with the fixed version of Defender…

I'm curious how much excess energy has been consumed, and won't be consumed any longer, as a result of this improvement - even just limited to reduced CPU usage on Windows machines using Firefox to watch Youtube. I love thinking about the impacts of tiny improvements at scale like this, might do some napkin math on it later and see if I can come up with something in the right order of magnitude.

Next: Canadian cars and their daytime running lights.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#88

> a ~75% CPU usage reduction was noted when browsing YouTube in Firefox I wonder how many of the people who say "Firefox is significantly slower than chrome" are using windows... On my computer, Firefox IS slower than chrome but (with ad blockers enabled) by an insignificant amount. By still being "the last remaining mostly independent, maintained and reasonably popular browser" I'd prefer it to use over chrome even…

Firefox is significantly slower than chrome. This usually doesn't matter, but you can immediately see it in any page that A) has a massive DOM or B) uses complex regular expressions that eat up the engine

For our benchmark suites at work, Firefox and Chrome generally trade back and forth on who's faster. It's not a consistent 'chrome is fastest'. I'm sure there are specific websites where Chrome dominates but I've yet to see any evidence that we're still in the bad old days where Firefox was orders of magnitude slower on important stuff.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#89
post #82
post #81

Earlier quoted context omitted.

firefox browser share is teeny tiny these days

Teeny tiny multiplied by 7 Billion by 365 days per year by 24 hours per day by a fraction of a kW does add up.

7B people are not watching youtube on Firefox 24/7 365 days a year.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#90
post #76

> a ~75% CPU usage reduction was noted when browsing YouTube in Firefox I wonder how many of the people who say "Firefox is significantly slower than chrome" are using windows... On my computer, Firefox IS slower than chrome but (with ad blockers enabled) by an insignificant amount. By still being "the last remaining mostly independent, maintained and reasonably popular browser" I'd prefer it to use over chrome even…

It's not just Windows that it's worse on though. It doesn't perform well on macOS either. It's not as bad as it used to be when it had a horrible power draining interaction with display scaling on macOS, but it's still isn't as efficient as Chrome or Safari.

I use all three browsers (FF for personal, Edge for work and on my Surfaces, Chrome on my chromebooks). Edge on Surfaces is the fastest and tbh these days I like Firefox over Chrome in every way, and don't notice a speed difference. I consider myself a power user, for what it's worth.
Post reply on HN