I recently noticed that animations in Safari were stuttering pretty badly on my M1 powered 2020 MacBook Air, and dove in to figure out why.
The why:
This wasn’t a bug. This was a feature.
By default, macOS Monterey enables “Low power mode” on Battery power and disables it when using a Power Adapter. Safari, it seems, is programmed to interpret this setting to mean that it should reduce the number of times it paints to the screen to prolong battery life.
On my MacBook Air, that means from 60fps to 30fps.
There I was breaking my head why my website was lagging on the brand new cutting edge M1 chip. Sincerely, thank you! I can now rest… Also, pulled out hair grows back right?
Now, what if we brought in will-change or contain-visibility? This would probably get interesting.
The majority of users will just think that the site they are viewing is a heavy bloated pile of junk.
There should at least be a message when on battery power. I am sure there are more battery hungry motions, eg video to quickly drain a battery.
I feel like this is monstrously over-zealous. How much battery power is this really even saving? If the answer is “not much” then this shouldn’t be a thing, and if the answer is “a considerable amount” then that’s pretty pathetic for an otherwise beast of a machine.
Yeah, I think there is an issue with the pro motion displays and the “request animation frame” in safari. I’m not seeing it drop down to 30 fps, but probably closer to 10 fps. Seems like something to get fixed in an update and not worth fretting over.