Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%
bugzilla.mozilla.org
bugzilla.mozilla.org
That's 250 megawatts saved, the equivalent of an average coal power plant. Because some Microsoft engineer missed a bug.
Sounds good
> like ESET
What?! ESET used to burn constant CPU when wifi disconnected.
300 million users * 4 hours/day * 5 watts = an average continuous savings of 250 MW.
Who knows what edge case triggered that bug to manifest but I for one haven't seen it in the wild in the years we've been using FF.
Probably difficult in such a large org to allocate dev resources to chase down and fix a bug few people were impacted by.
That same site also suggests that Firefox has around 200e6 monthly active users, the average user uses Firefox 3.5 days a week, and for 5.5 hours per day.
My math could be wrong, but taking the above into account, and arnaudsm's 5 W estimate, I come up with an upper bound of around 80 MW. Discount that further by whatever proportion of Windows users you assume were actually affected. Not a whole coal power plant, but nothing to sneeze at.
Other - 4.09%
https://www.statista.com/statistics/265033/proportion-of-ope...
I think this is probably a major blocker for many enterprise users, and wish Mozilla would have fixed it.
edit: it looks like they may have fixed this in the past couple years, though you might have to go poking around in about:config.
Produces in an hour, four hours?
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 large scale apps that are on millions of devices, hundreds of thousands of servers, or even just some back office guy who has minutes less stress in his day, performance benefits the world. For programmers, it’s one of the easiest ways to Save the Planet™.
In some cases you convince your organization to shift focus onto more useful products, and that can be a really great feeling. In other cases (company is too large, management too committed) it helps you confront exactly who you're working for. Because if you're going to sell your soul, you should at least make sure you're getting a good price.
Perhaps I’m getting into a bit of a niche here, but the rise of stringy formats for data transfer concerns me. There are many-stage pipelines on machines that agree on what a 64 bit integer is, yet each stage performs encoding and decoding of JSON twice (decoding upon receipt, encoding to pass it on to the right place, decoding the response, encoding it in another manner to reply to the original sender). Sounds like a minor concern, but the scale of this instinctively feels like it’d dwarf 250MW globally.
… anyway…
Why make the world worse for ourselves and our children when you have other options?
Pardon me, I think there are some electron devs at my door asking for a word. They might have baseball bats.
And it's not like those Shops suffer for it, so it isn't very surprising they continue.
If Electron frees up organizational resources to do what’s actually important, I applaud devs for using it.
Optimizing performance and fixing crashes/bugs/dataloss aren't mutually exclusive, either. Developers who care less about code quality than checking boxes for features requested by management or customers, will write code that's both suboptimal and buggy.
How on earth would you know that? No, incorrect.
I'm not sure the devs stopped caring as much as the powers at be. Software development has become more commoditized than we want to believe. Devs following an agile workflow with every intent of performing multiple rounds of optimization find that the product gets shipped as soon as it approximates the thing that had been conceived originally.
It doesn't look like an immediate failure, so the less that leadership takes from it is frequently that the level of maturity they shipped is safe. The cycle continues and eventually folks lower down succumb to this shipping pattern. The only things that get them to optimize is competition that successfully drive home their win was due to performance. This doesn't always lead to optimizations when you are an incumbent who can still close more feature gaps because those often result in higher sales and revenue.
Somewhere I saw a rough figure about phones. Something like: if everyone was able to keep their phone one year longer, it would be the equivalent of 600,000 cars off the road or something. (Just looked it up - source is possibly the founder of iFixit).
But you know, development velocity or whatever.
This is a result of:
* Single-core performance no longer dramatically improving - almost plateauing
* The rate or extent of "bells and whistles" and other OS overhead being added - decreasing.
* Budget consumer CPUs having reached smooth desktop performance (with sufficient memory and and an SSD) already, even with multiple applications open.
.. and all of these had not been the case during the 1980s, 1990s and 2000s. Now, if your machine's hardware doesn't brake down - and you're just a plain desktop user - your motivation for throwing away your machine is quite limited.
---
Of course, this is not the case for smartphones, we're still on the roller-coaster there.
Absolutely! Most non-tech folks would be delighted by this. Regular users generally don't care one bit about whatever fad style or trendy feature got added with the latest update, they are just annoyed that their buttons or icons got moved around.
And many tech folks too. My phone is a tool, not a lifestyle. I don't need my tools constantly changing out from under me.
I like to look at websites that offer "last season" outdoor gear at discounted prices. The major frustration is that the sizes are never my size of shoe/shirt/etc because the popular sizes are gone sooner than the odd sizes.
There is no "domain-specific" improvement (The "domain" in this case being "last season discount retailer.") to the basic shopping cart ecommerce experience that would give me a way to flag my interested product or product category so that I could be notified when the item is in-stock.
This basic feature would vastly improve my interaction with the websites and would probably result in higher sales.
In today's world, that's a huge ask to have that kind of feature implemented.
Heck, even asking for a good "syntaxable" search seems to be an impossible ask. Imagine being able to search "Category: Shoes; Brand: "North Face"; Price: >50&&<120"
The fact that this is never implemented yet billions of dollars are poured into ecommerce development kinda reflects how the industry is focused on improving the tooling/back end and not the design.
I see vastly more posts in this vein: "Nobody really knows how this complicated spaghetti-like system works"
than in this vein: "X tool allowed us to build a Maserati of our domain."
- Developers get new, fast devices (yay). We make our software just fast enough to run smoothly (enough) on our own devices. Then we ship it.
- Users' computers are slower than the developers' computers. Users experience is bad because the software is slow.
- Users buy new computers too. Money is poured into R&D for even faster computers.
- Hardware companies release faster hardware
- Developers buy new, fast computers
And the cycle continues.
For general purpose computing, there's not really any meaningful difference between my computer today and my computer 15 years ago. But I can't use that old computer, because modern programs don't work well on it any more. I can't imagine how slow modern Discord or Microsoft Teams would run on my old 2012 macbook air - even though that machine is orders of magnitude faster than the computer I was using to chat on IRC in the late 90s.
I'm low key convinced that if computers and phones stopped getting faster tomorrow, the software industry would grumble but get on with things and adapt. Users wouldn't really notice anything change, except we'd all be richer because we would no longer need to buy new computers every few years.
There's a few notable exceptions of course: modern AI, video production & animation, and massive cloud services (like Google and Netflix) who actually optimize their code. I'm on the fence about compilers - do LLVM & rustc really need to be that slow? Netflix might never make it to 8k video (boo hoo). And ray traced video games might not happen. But the average consumer would probably be delighted. And the savings to the environment would be insane.
I remember using a computer 20 years, and they would take multiple minutes to boot into something that was usable, and executing programs would take quite a few seconds because the HDD had to go searching for stuff the executable required.
My current desktop has a Samsung 970 NVME SSD, it boots up in like 20 seconds or something, and everything is extremely responsive as far as reading from the disk goes.
It's interesting that the one thing that hasn't been completely neutralized by the treadmill is SSDs!
Also the LLVM and Rustc thing is interesting. I imagine they are doing much more advanced optimizations than what compilers did 20 years ago so they probably have a good excuse, but I think these optimizations are also neutralized by the treadmill eventually.
it is an absolute abomination, and these words does not even remotely do justice to just how horrible it is
How did you come to this?
Are you sure you want to invoke this logic? Because following it through imagine the energy savings if Firefox users switched to Chrome.
Perhaps a "niche" use case for some, but there's a lot more Firefox users on Linux in particular
1. https://www.tomsguide.com/news/chrome-firefox-edge-ram-compa...
Ironically, Mac users routinely complain about how power-hungry Chrome is on the Mac. Safari is significantly more efficient.
Based on the increased laptop battery life I notice, so is using Edge on Windows.
It makes sense that both Apple and Microsoft can extract the best out of their OS + browser. There's no way Firefox can compete on such OS specific optimizations.
The new Edge based on Chromium performs better than Chrome with regards to power consumptions.
The old Edge was even better in terms of power consumption. Like a few extra hours of battery life.
Entirely serious question. Apple is known to severely privilege their own applications over competitors.
It’s entirely possible that Safari is intentionally avoiding features that make it wake up-
I doubt that it does anything unavailable to other browsers, thats MS territory, because they wanted features. I feel like safari, by contrast, doesn't want to add features.
IME, Safari is no better than Brave in terms of battery, even when I’ve got hundreds of tabs open.
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.
https://github.com/WebKit/WebKit
> Most users wouldn’t even notice that their choice to use Safari is responsible for their great battery life.
Seeing that MacOS has called out which apps are using the most energy for years, users can definitely tell which apps are using the most battery life.
But you are free to download the source code, compile and run it yourself to see if it is less battery efficient than the official builds.
If either browser’s manufacturer wants to see what Apple does to make Safari more battery efficient, they are free to look at the source code to WebKit.
I recall some feature I was using that ran in an inferior way to save power on Safari, so much so that I had to kill that feature and use a different API
Google's only incentive to make Chrome more efficient is when they start receiving heat (no pun intended) about bad performance.
- Switching from Firefox to Chrome might be similar to switching between two car models, one consuming less energy than the other.
- Fixing this bug is more like going to a car workshop to fix an injector issue in your car that was causing higher fuel consumption and more pollutants.
The first one is really a matter of tradeoffs and personal choices. The second one is less of a choice and more of an actual issue that was left due to negligence. Hardly similar.
One could also argue that the OS is the car, the browser is the chauffeur, and the user is the passenger.
Quoting the Mozilla engineer responsible for most of the recent activity on the bug:
"This problem has two sides: Microsoft was doing a lot of useless computations upon each event; and we are generating a lot of events. The combination is explosive. Now that Microsoft has done their part of the job, we need to reduce our dependency to VirtualProtect."
It was also noted elsewhere in the thread that similar, though less severe, CPU impact is seen with other antivirus products.
Microsoft was doing something wrong that made this operation more expensive than it needed to be, but Mozilla is also doing this far more than any other browser.
The reason it is not “invoked” is because energy prices are sufficiently low (due to not pricing in externalities) that there exists little incentive for end users to optimize for power usage.
You're right in principle, but in practice even factoring in externalities electricity prices won't be high enough for people to care. Using current US carbon intensity for electricity generation[1] and the higher end estimates for the social cost of carbon[2] gets us carbon costs of $0.142 per kWh. The average prices in US is $0.168. Adding in carbon costs would almost double the price, but there are countries with even higher electricity prices[4] and they're not exactly switching to more efficient software in droves to save energy.
[1] https://emissionsindex.org/
[2] https://en.wikipedia.org/wiki/Social_cost_of_carbon#Carbon_p...
[3] https://www.bls.gov/regions/midwest/data/averageenergyprices...
[4] https://www.statista.com/statistics/263492/electricity-price...
i've read everywhere that Firefox at this point is far more energy efficient than Chrome...is that not true?
Nah, I like my privacy. How about replacing Electron apps with native apps instead?
> imagine the energy savings if Firefox users switched to Chrome.
Imagine the privacy savings if Chrome users switched to Firefox.
This is why I left firefox.
In seriousness, though, this is an issue. Elsewhere, I observe arguments about eg userbenchmark rankings, and the comparative relevance of single-core vs multicore performance. Are you playing a game, or rendering video 24/7 -- or running some entirely synthetic workload that allows for a peak performance the real world would never achieve? Same kinda problem.
Situation seems to happen some time after visiting ad-heavy sites (yeah I know I should install an ad-blocker). Have others noticed this? Seems to be Chrome. I also use Firefox and occasionally Safari but have not noticed that with those browsers.
Far worse due to privacy/adblock addons.
Enlighten us.
Imagine the power savings if everyone used pihole, ublock etc.
Second uses more power than the first and is better. Do it!
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.
And then imagine Safari on an M1.
The optimum is likely somewhere where most people use the currently most efficient solution and others keep alternatives alive and competitive.
In switching browsers, you get different features, workflows and functionality, many of which you prefer on Firefox, which is why you’re using it.
With this bug fix, there is absolutely no loss or change in functionality (other than increased battery life), and yet you’re getting the benefits.
This bug is pure waste.
That might be a bit too kind given how much Google liked to Oops Firefox. Wouldn't be surprised if MS did too.
Oops:
https://www.computerworld.com/article/3389882/former-mozilla...
I don't like video games and they are not-necessary so I propose that we ban them globally, or only allow gaming if using renewable energy. If you don't live in a place where this is an option, too bad!
Maybe instead of this we require all games to be limited in graphical effect (imagine early source games or something). We could save a lot of power globally if we enforced this.
This is why I strongly dislike this line of thinking. I don't think power plants work that way anyways, they probably make a constant-ish amount of power rather than taking exactly 50w worth of fuel every time someone opens up Call Of Duty.
There are also much lower hanging fruit to get upset about if you care about the planet, like cars with large motors or people with heated drive ways (yes thats a thing).
My intention was to compare the listed things against MicroSoft engineers making mistakes while programming Windows Defender (the quote below), or programmers writing bugs in general.
>Because some Microsoft engineer missed a bug.
Unfortunately devs dont realize how needlessly power hungry software is when they don't need to be. But hey, its easier to use electron and javascript than it is to save the planet.
That's not how power or energy works.
5 [W*hr/day] (Kept in energy units per interval rather than average power).
200e6 users/day who surf for maybe 4 hours/day
5 * 200e6 * 4 / 24 = 133 [MW*hr/day] (133/24 = 5.5 MW)
A typical US home uses 11 [MW*hr/y] or 0.36 [MW*hr/day].
(Convert to power draw, that's 0.015 MW.)
mean consumption of roughly 400 US homes (133 / 0.36).
The smallest US grid-tied operational nuclear power plant produces 600 MW. 133 MW very small coal power plant would 400 MW.
5W/user * 200e6 user * 4h/24h = 167 MW
11 MWh/a/home = 0.00125 MW/home
167 MW / (0.00125 MW/home) = 133 000 homeThat's about 2.2 TWh per year. A decent estimate for average worldwide CO2 intensity of electricity is 400 gCO2e/kWh (that's 400 tons per GWh). A typical personal footprint including some international flights will be in the tens of tons.
Really nice to see open collaboration between Mozilla and Microsoft development teams resulting in a net improvement for everybody.
IIRC, a couple of patches did get submitted, but never accepted for unknown reasons.
To be clear: I'm aware Windows Defender updates itself independently of Windows Update, and I actually don't mind and even appreciate this behaviour since Defender updates almost always aren't intrusive unlike the rest of Windows Update.
Just an FYI for people with similar configs.
> This is one of the myriad reasons why I have a strong preference for Linux.
Feel free to tell me I'm a sell-out, I am happy to be one today.
Honest question. If you could get that on Linux, would you? and what kind of pricing would you consider reasonable? Is it something that would have to come with the computer (i.e. would you pay for it separately or would you only use it if it was "free" aka included with your laptop purchase)? Did you stick with the vendor-provided install or did you wipe and install your own preferred distro?
Howver, whatever crazy-stable and easy to use and well supported hypothetical Linux this is wouldn’t be compatible with my “real” Linux use cases so I would then also install Arch or whatever and live with constantly borked everything and just swap between my Arch “Dev” OS and my “Linux Mac” business/work/consumer OS.
Current Linux cannot be made “MacOS”-stable. But maybe in 5 years.
Stable?? Linux is a rock of stability, you must mean something else.
Or non-Ubuntu, software just randomly falling apart after 2 years. Like I need a newer kernel for a new Wi-Fi card but then I need a different GPU driver and that’s incompatible with some softwares UI library, so they update that but it has an incompatibility with something else.
Or how Linux still has Wi-Fi 6 totally broken.
Sure, Linux is rock stable if you have a production environment where everything is nailed down. But from an actual daily consumer user point of view it doesn’t feel stable. At all.
I love Linux. I love fixing it when it borks. But my god does it break every week.
Don't blame the good, for the things bad does.
I go months on my Debian desktop without issues, through upgrades, and only reboot for kernel updates!
I would love a Linux daily driver but I've had similar experiences to the above every time I've tried it for the last 15 years.
It says use it for non-GUI newest release upgrades? Why are you surprised the GUI disappeared?!
Also, why did to do that, if you wanted to keep the current version?
Anyhow, I never have such issues with Debian. Do bear in mind, Ubuntu(or any distro) is not Linux.
Are you going to call Linux "unstable", because you get a crappy phone with Android(which is judt more Linux).
Glad you like your machine.
What's your machine+distro?
(brew addresses a lot of the issues though, even if I do have to remember to run gdu instead of du (for gnu du))
One problem that I have is all that all those mods and add-ons are out there, but there's a real mindset that "everything must be an app" and a pursuant mindset that "might as well charge for it". I don't mind paying for a complicated app, but there are certain basic features that used to be served by the freeware model on Macs that just aren't any more, and my impression is that things are heading ever more in that direction. (As well as in the direction of subscriptions over app purchases, which are right out for me for basic utility needs.)
You mentioned Rectangle.app and Hammerspoon, which are both open source. Do you have any good recommendations for where to look for other high-quality open-source mods and add-ons for macOS?
Personally I'm okay with paying for software (though I do whine about it from time to time). Yeah it should just be built in functionality, but someone devoted their time to building a thing, so I don't begrudge them a couple bucks for it - so long as it's a one-time purchase and not a recurring subscription model for unchanging functionality.
Being an average Joe is fine with me.
"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."
Total speculation, but Firefox seems to be pushing out a lot of UI gimmicks. Maybe they're trying to drum up interest in the browser that way, since they seem intent on killing many of their other differentiators.
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
It’s a YouTube setting, not a Firefox setting.
If anything redirect the frustration to the leadership that doesn't prioritize fixing these kinds of errors.
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 out how the choice to turn this on by default should have been more nuanced and thought through.
- BatteryManager.charging
- BatteryManager.chargingTime
- BatteryManager.dischargingTime
- BatteryManager.level
https://developer.mozilla.org/en-US/docs/Web/API/BatteryMana...
It should just be a setting the user can select. No probing of the machine necessary.
But if you mean there should be a setting in the browser that websites could check, I agree that could be better.
I don’t think there is a bug? It seems like a sort of image processing thing that might take a bit of compute run. To the extent that there’s blame, I’d lay the blame at the feet of whoever decided it should be turned on by default.
There are millions of FF Mac users, it’s not unreasonable to expect YouTube to do some basic testing. Never got any issues showing ads, though.
Ultimately the result can be that an employee chooses health, survival and the social status that a job title brings and ships a product or feature that they can sell to their manager as innovative / disruptive / greatness reimagined.
Then again, I am using a real computer and not a toy.
This sounds like it should be relatively cheap if composition is properly accelerated.
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.Completely hiding it in normal mode isn’t the best choice, but it is somewhat understandable.
the best way to make youtube videos more immersive is to block obnoxious advertisements, remove useless algorithm-driven recommendations, and delete the comment section
When done right, sure, they improves the user experience by some percentage. But when done badly, the UX goes down by orders of magnitude.
> The iPhone 15 Pro and Pro Max will use a new ultra-low energy microprocessor allowing certain features like the new capacitive solid-state buttons to remain functional even when the handset is powered off
[1]: https://www.macrumors.com/2023/03/20/iphone-15-volume-mute-b...
youtube.com###cinematics.ytd-watch-flexyRun your own alternate frontend - https://github.com/iv-org/invidious
Firefox engineers discover a Windows Defender bug that causes high CPU usage - https://news.ycombinator.com/item?id=35458746 - April 2023 (215 comments)
Is the current post significant new information* or just a repeat of that submission?
* https://hn.algolia.com/?dateRange=all&page=0&prefix=false&so...
I'd be grateful for an overview of the bug. I don't think I've seen it on my two systems but I can't be confident.
I think it'd be more convenient (for me as a keyboard centric user at least) if it were done differently but I don't think it's actually a bug as much as an intentional decision at the cost of keyboard user. This is unlike the Defender issue where it's of no purpose to be significantly slower than it needed to be.
I often accidentally rename files in macOS Finder (hitting Enter activates rename).
The problem is that there is zero incentive to get them right. Nobody is going to get promoted because they use 10% less CPU. Nobody is losing their bonus because 10% of all computers melt down. etc.
Which, in my experience, isn't far from the truth.
Other people think so too: https://caseymuratori.com/blog_0025
Per the bug report, Firefox was generating up to ~14,000 calls where Chrome was generating ~300, though.
Surely it is Firefox' team's responsibility to use system calls in a sane way, say not almost 50x more than the competition?
> With a standard Firefox configuration, the amount of calls to VirtualProtect is currently very high, and that is what explains the high CPU usage with Firefox. The information that the most impactful event originates from calls to VirtualProtect was forwarded to us by Microsoft, and I confirm it. In Firefox, disabling JIT makes MsMpEng.exe behave much more reasonably, as JIT engines are the source of the vast majority of calls to VirtualProtect.
> On Firefox's side, independently from the issue mentioned above, we should not consider that calls to VirtualProtect are cheap. We should look for opportunities to group multiple calls to VirtualProtect together, if possible. Even after the performance issue will be mitigated, each call to VirtualProtect will still trigger some amount of computation in MsMpEng.exe (or third-party AV software); the computation will just be more reasonably expensive.
> > the amount of calls to VirtualProtect is currently very high
Calling VirtualProtect is not writing to the temp folder. The VirtualProtect call is to change the permissions of the in-memory pages. It should be an inexpensive system call (other than the cost of TLB flushes and/or shootdowns).
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 defense of Firefox nor Mozilla.
- 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 some point.
As a software developer, I've had to workaround many many bugs in OSs, especially when dealing with updates to Android. It's just part of the job.
If your users are on Windows, you have to be where they are. Moving target, wonky API, warts, and all.
Yes, it's Sisyphean. That's why my shop had a whole room stuffed with parallel Windows installs. We couldn't afford to have our users be the first ones to notice Microsoft pulled the rug out from under us again.
It's very common knowledge that on Windows you will get terrible performance if you have many many small files.
I don't know why Microsoft doesn't fix that. Maybe they can't for compatibility reasons or something. But that's the way it is, and any software that wants to run well on Windows needs to deal with it by using fewer bigger files.
The docs for that function don't say anything about performance: https://learn.microsoft.com/en-us/windows/win32/api/memoryap...
They also don't say anything about "sane" usage, and while I don't have an MBA, I'm pretty sure they don't teach anything about `VirtualProtect` ratios when doing competitor analysis.
One possibility is that the Chrome team's implementation was more efficient due to luck, or they invested the resources to identify the performance characteristics of this function call, whereas the Firefox team missed it. I don't think "Chrome has more development resources than Firefox" is news to anybody.
The spec, the intent of the spec, and the implementation of the spec.
Doesn't matter what the docs say; what matters is what performance testing shows. Docs lie.
And even if Chrome lucked into a cheaper implementation: that luck has given them a market edge.
I worked on a desktop<->cloud 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.
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 targeting "the public" as your userbase you must account for that. And Mozilla knows this: if you go into the source code (circa 2009, YMMV) and look through the initialization and boot-up logic, you would find places where the system used heuristics to figure out whether some extensions had been installed in odd places instead of the "Extensions" directory (because the tool had been installed before Firefox) and hot-patch paths to pull in that component. Because if a user installs Flash and then installs Firefox and Flash doesn't work in Firefox, it's not Flash that's broken... It's Firefox.
It doesn't matter if the bug is in "Microsoft's code" or "Mozilla's code." That's unimportant. If you're a Mozilla engineer, all that matters is whether this bug would cause a user to get pissed off and uninstall Firefox.
Thats. All. That. Matters.
"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.
Windows Defender isn't "arbitrary software" - it's built into the OS and enabled by default. To anyone building an application for Windows, it should be considered part of the platform.
This comment is a good summary of what the issue was once they understood the problem: https://bugzilla.mozilla.org/show_bug.cgi?id=1441918#c82
The speculation about SQLite at the top of that Mozilla bug report is mostly irrelevant.
The bug was that ETW (in the antivirus process) was doing something braindead; zeroing a megabyte of memory unnecessarily every time someone called it just to get the size of a buffer.
That's an educated guess... that is unfortunately very easy to disprove :(
You are assuming things you are unsure about :) Even if your assumption was correct things could change from one Windows update to another.
When I worked on a time sensitive java project, our test suite had benchmarks for JDK functions as simple as Arrays.copy() to make sure we are the first to notice if something changed under the hood.
Malware protection algorithms make fools of us all.
The bug was in ETW, which just happened to surface in a windows utility that ostensibly protects you from malware.
But also even with the most basic win10, cloud submission (if privacy is no biggie) gets you EDR detections to a point but without the edr console and logs.
When I simulate attacks with defender on, I would spend a lot of time bypassing it but then as soon as I break opsec (e.g.: run whoami.exe) if cloud submission is on I basically burn that technique because the edr in their cloud blacklisted it but with that off I can last as long as I want so long as I don't execute things flagged as malware by the defender on the host (and even then, usually that thing gets blocked not my original technique which I can still reuse).
Having everyone easily disable Windows Defender will not lead to a great outcome.
There's a reason malware on Windows has been on a steep decline from the Windows XP days and I'd prefer it to keep it that way.
I really only use this machine for MWII, Halo and Titanfall. It's a glorified Xbox. I even contemplated putting it on a standalone VLAN to 100% physically isolate it from my core net.
Their solution? Make it intentionally complicated, but still possible:
Step 1: Turn your headlight switch off
Step 2: Unbuckle your seatbelt and turn the key to the off position
Step 3: Turn your key to the on position till the seatbelt warning light turns off
Step 4: Buckle and unbuckle the seatbelt three times and end on the unbuckled position
Step 5: Turn your headlight switch on for three seconds and then turn it off
Step 6: Repeat step number 3
Step 7: Wait for the seat belt warning light to turn on and off again then buckle and buckle the seat belt
Seat belts are 100% an immediate habit for me. Driving at any rate of speed without one makes me feel super sketchy and uncomfortable, so the nag is not needed at all.
On my Ford's I would use FORScan to defeat it via the OBD2 port.
I do have a security gateway bypass module for my truck though so hopefully I will be able to start playing around with AlfaOBD soon.
I know it’s not your main point. But anyways.. it does not increase the rhetorical power of your comment.
Under Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus
- Turn off Microsoft Defender Antivirus -> set to Enabled
Under Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Real-Time Protection - Turn on behavior monitoring -> set to Disabled
- Monitor file and program activity on your computer -> set to Disabled
- Turn on process scanning whenever real-time protection -> set to Disabled
- Turn on behavior monitoring -> set to Disabled
Restart the computer and Real-time protection should be disabled permanently (until you reverse the same settings through gpedit.msc at least).Alternatively, if you run windows server as your workstation OS, you can perform an uninstall using Remove-WindowsFeature from powershell.
The old gpedit tricks don't really work anymore in my experience.
I wonder whether this situation with Microsoft Defender cost Firefox some market share.
a) That'd be a very untargeted way to get that effect; Firefox isn't the only app that's going to be making calls like that.
b) Mozilla doesn't need any help losing marketshare in this era.
There was a MDE bug that caused Chrome to crash whenever dragging tabs.
Another time, MDE also appeared to "remove" all of some users apps when it deleted shortcuts.
Careful to talk about how this is entirely a fix for Windows and will improve the experience of folks using other software, not just Firefox.
> It also has a bug(?) which makes method calls 100x slower in PowerShell 7: https://github.com/PowerShell/PowerShell/issues/19431
My guess is that this would mostly come from inline caches (ICs), since they're typically small and a lot of them are generated.
Although the V8 JIT stopped using this, at least in some configurations (?), for the stated reason that it's not perfect—another thread could sneak in and modify the executable code in between when it was generated and when it is protected in preparation for execution. They're instead planning to rely on memory protection keys, which should be faster and more robust, but are only available on some hardware.
JITs can show up in unexpected places. Regular expression engines will sometimes have a JIT.
So... I don't know?
That bug is more subtle. Apparently the various ways to use VirtualAlloc is not self evident, and some variations have wildly different performance characteristics due to undocumented interactions with Event Tracing for Windows (ETW) events that get sent to anti virus products.
So it's not only the original problem of the events being handled inefficiently, it's also that the way they're generated is a bit of a black box and hard to predict without detailed performance tracing work.
But if you use Firefox to call yourself on Chrome... you'll see that Firefox takes up a TON more energy on an Intel MBP than Chrome does.
You can tell because Firefox literally heats your laptop up to do streaming videos. You hear the fans kick on, the laptop gets hotter to hold.
Anyway I'm sure there are more bugs like this! Glad Firefox is getting some of the people to fix their code... but look, Microsoft isn't the only culprit. Until Firefox takes as little power as Chrome in MacOS & Windows... I think we should all stay outraged! (=
I really have no clue why engineer at ms think such behavior is ok. Shouldn't scans like these scheduled at some time slot that people are not actively using computers?
By the looks of it took Firefox a few years to figure out what the repro was, they reported it to MS, it was (very) promptly fixed and they were warned that the syscall they were using isn't being used as intended and they should consider changes to FF for future use cases.
> Have you any semblance of proof of this?
Does it need proof? Someone can make a statement like this solely based upon past behavior. They're merely stating that it is plausible.
Yes, it does. Stringing together a narrative and ignoring the proof that contridts your claims is conspiracy theory territory.
> Someone can make a statement like this solely based upon past behavior. Yet all the evidence (the bug linked) implies nothing of the sort.
> They're merely stating that it is plausible.
I can state that it's _plausible_ that the US government conspired with Disney to fake the Moon landing as a show of power to the USSR in the 60's, but I'd expect to be asked for proof, and I'd expect to be accused of spreading absolute nonsense.
* Corporate doublespeak is a well documented tactic in which a business will project a message when the truth is the opposite of the message. Sometimes they use euphemisms, ambiguity, or omissions. I am stating that we cannot take Microsoft's press releases about being Open Source friendly at face value.
* Five years ago Edge was rebuilt with a chromium backend and Microsoft had a large campaign to increase adoption of Edge.
* Reduced Firefox performance would make Edge compare more favorably. This error was clearly in Microsoft's favor.
* It is common for companies that own a platform to create advantages for their applications running on the platform.
* Microsoft has a long history in the browser wars, highlighted by an antitrust lawsuit in the late 90s. Their anticompetitive behavior regarding browsers was a key part of the lawsuit.
Except you don't have any proof, and the proof that opposes your wild speculation is:
- 5 years ago, a bug was opened on the FF issue tracker that over the years had a bunch of derailments.
- A month ago, someone _actually_ investigated, found an issue and reported it to Microsoft.
- Issue was promptly fixed
You're spreading FUD, and attacking _me_ for asking for proof when you made the accusation in the first place. If you want to discuss this reasonably, I'm happy to, but in order to do that, the slightest modicum of bait that points to any sort of effort is required, meanwhile to someone who has worked on software for a reasonably long time, seeing issues spin like this for years is par for the course, and it's great that someone fixed it.
> This problem has two sides: Microsoft was doing a lot of useless computations upon each event; and we are generating a lot of events. The combination is explosive. Now that Microsoft has done their part of the job (comment 82), we need to reduce our dependency to VirtualProtect.
(https://bugzilla.mozilla.org/show_bug.cgi?id=1441918#c90)
Compare how many calls other browsers make (this is also quoted in the link): Firefox was generating up to 46 times more (costly) events than Chrome. It is a bit ludicrous to shame Microsoft for the whole situation.
> Firefox with normal configuration: ~14000 events, 98% of which are PROTECTVM_LOCAL;
> Firefox with the preferences from comment 83: ~6500 events, 95% of which are PROTECTVM_LOCAL;
> Edge: ~2000 events, 91% of which are ALLOCVM_LOCAL;
> Chrome: ~300 events.
See: Microsoft's Supreme court case over their preference for IE and forced monopoly. While Microsoft 'won' the case, the outcomes were exactly what the case feared but "convenient" political climate helped them avoid travelling back to court of course. Microsoft took extreme steps to avoid being broken up in the 1990s however and it's arguable that one of their political mitigation methods, investing in Apple, actually had worse effects on them. (Prior to the iPhone in 2007, it was assumed that RIM and Microsoft would be the big two players in the smartphone space, Apple and Google have basically become the big two players in the Computing space mindshare)
https://en.wikipedia.org/wiki/United_States_v._Microsoft_Cor....
Microsoft has a storied history of anti-competitive views leaking to public eyes/ears, something like this is quite literally a matter of not organizing anyone.
https://news.ycombinator.com/item?id=35458746
@dang
Only keep a license around for the occasional gaming session. Disable all of the Windows features (ie, firewall, auto updates, antivirus) and telemetry. Strip the OS to bare minimum and manage the GPU, mobile drivers manually. Limit it to only games
If you reduced something to zero, you reduced it by 100%.