Microsoft fixes 5-year-old Windows Defender bug that was killing Firefox performance

Alfonso Maruccia

Posts: 1,020   +301
Staff
Why it matters: Microsoft has released a crucial bug-fixing update to its Windows Defender antimalware application. Its arrival means that some unlucky Firefox users should now get a much smoother and better-performing experience while browsing the web.

Update (April 11): The Mozilla developer who worked on fixing this performance issue and reported it to Microsoft added the following on a Reddit thread, clarifying the nature of the bugfix:

"The impact of this fix is that on all computers that rely on Microsoft Defender's Real-time Protection feature (which is enabled by default in Windows), MsMpEng.exe will consume much less CPU than before when monitoring the dynamic behavior of any program through ETW (Event Tracing for Windows)."

"For Firefox this is particularly impactful because Firefox (not Defender!) relies a lot on VirtualProtect – which is monitored by MsMpEng.exe through ETW. We expect that on all these computers, MsMpEng.exe will consume around 75% less CPU than it did before when it is monitoring Firefox."

For more than five years, the security protection provided by Microsoft Defender was negatively affecting Firefox users during their web browsing sessions. The Antimalware Service Executable component of Defender (MsMpEng.exe) was acting strange, showing a high CPU usage when Firefox was running at the same time.

Users were complaining that Defender was stressing the CPU while the Mozilla browser became laggy and unresponsive. The issue was first reported 5 years ago, and it was seemingly a Firefox exclusive as it was sparing Edge and other third-party browsers like Chrome.

In March 2023, Mozilla developers were able to finally discover the source of the issue: Firefox relies and executes a very high number of calls to the OS kernel's VirtualProtect function while tracing Windows events (ETW). VirtualProtect is a function to change the "protection on a region of committed pages in the virtual address space of the calling process," Microsoft explains, and Defender was doing a lot of "useless computations" upon each event while Firefox was generating a lot of ETW events.

This was an "explosive" combination that was using five times the CPU power with Firefox compared to other browsers, the Mozilla developers said. The open-source foundation worked with Microsoft to solve the issue for good, and Redmond finally delivered with a recent update for Defender's antimalware engine (1.1.20200.2).

After testing the bugfix for a while, the solution was delivered to the stable channel with updated Defender anti-malware definitions on April 4 (mpengine.dll version 1.1.20200.4) and the bug was finally closed.

Mozilla developers said that the Defender update would provide a massive ~75% improvement in CPU usage from MsMpEng.exe while browsing the web with Firefox. With the fix, Defender's Real-time Protection feature – which is enabled by default in Windows – will consume less CPU than before when monitoring the dynamic behavior of any program through ETW.

Microsoft is also bringing the update to now obsolete Windows 7 and Windows 8.1 systems, as Firefox will keep supporting the two operating systems "at least" until 2024. Furthermore, Mozilla engineers said that the "latest discoveries" made while analyzing the weird Defender bug would help Firefox "go even further down in CPU usage," with all other antivirus software and not just Defender this time.

Permalink to story.

 
I don't know why people use Windows Defender, there are enough quality free options out there to choose from. It's never smart to integrate everything through your OS, especially when that OS is so buggy and has such a poor track record on security---perhaps intentionally leaving backdoors.
 
I don't know why people use Windows Defender, there are enough quality free options out there to choose from. It's never smart to integrate everything through your OS, especially when that OS is so buggy and has such a poor track record on security---perhaps intentionally leaving backdoors.

Well, in the XP / Vista era, there where a dozen or trillion infected machines. By putting Defender as a standard with newer versions of windows, you kind of like, block 80% of the malware infected machines out there.

Just like Linux can be suited with ClamAV which is a free version and blocks like 85% of the known malware...

nobody bothered what was going on with Windows Defender and Firefox. Untill now.
 
The best part about having a high-powered 8-core CPU? You don't notice things like this. :laughing:

Joking aside, I honestly never noticed anything from Firefox that indicated a system slowdown. Hell, I would even leave Firefox running in the background when gaming without issue. I wonder if I'll notice a difference now...
 
Figured I would cross post this here since the OP specifically calls out TechSpot, but I’m not the OP Firefox employee, this is from a Reddit post about this news:
Please always remain critical of what you read online. ghacks shared wrong details about this bug fix, which other articles have copied without checking the source. The one from TechSpot is particularly clickbait.

The impact of this fix is that on all computers that rely on Microsoft Defender's Real-time Protection feature (which is enabled by default in Windows), MsMpEng.exe will consume much less CPU than before when monitoring the dynamic behavior of any program through ETW. Nothing less, nothing more.

For Firefox this is particularly impactful because Firefox (not Defender!) relies a lot on VirtualProtect (which is monitored by MsMpEng.exe through ETW). We expect that on all these computers, MsMpEng.exe will consume around 75% less CPU than it did before when it is monitoring Firefox. This is really good news, unfortunately it is not the news that is shared in this article.

Source: I am the Mozilla employee who isolated this performance issue and reported the details to Microsoft.
 
Figured I would cross post this here since the OP specifically calls out TechSpot, but I’m not the OP Firefox employee, this is from a Reddit post about this news:
Just updated the story with the details shared by the Mozilla dev. I'm under the impression that he read the ghacks article and didn't read the TechSpot article fully. As far as reporting goes, the article describes (in less technical/dev oriented terms) what is reported in the bugfix bulletin: https://bugzilla.mozilla.org/show_bug.cgi?id=1441918#c82

The headline may be a little colorful, I will say that.
 
At last... I did notice this CPU usage from the Microsoft antivirus service, and thought it was normal...
Well, that's good news, even if it took so long!
 
Will this also fix the problem with Firefox not using more than 500 Mbps of network(internet) bandwidth on my Windows 7 system?
 
Microsoft : Firefox is slowing your PC we advice you to switch to Edge
Sabotage of Firefox by Microsoft is what it should say!!🤬🤬 Saw a post in a forum, guy said his PC was running slow, someone asked how many Chrome tabs he had open. He said sixteen, was told to close all but 3, then said "yay that fixed it" 🤣🤣🤣
 
Back