5 ms·
I don't like encouraging mucking around in about:config, but I might as well mention this one. If you don't mind your window losing vibrancy and rounded corners
by pcwalton 8y ago
I don't like encouraging mucking around in about:config, but I might as well mention this one. If you don't mind your window losing vibrancy and rounded corners, you should be able to significantly improve battery life on macOS by setting "gfx.compositor.glcontext.opaque" to true. This makes WindowServer stop drawing whatever is behind the Firefox window.
This bug tracks the proper solution: https://bugzilla.mozilla.org/show_bug.cgi?id=1429522 https://bugzilla.mozilla.org/show_bug.cgi?id=1429522
- bmurphy1976 8y agoI have a new 2018 MBP with an i9. I've noticed I can squeeze upwards of six hours battery out of it using Safari. With Firefox I'm lucky to get three. I made this change just to see. So far it does appear to have lowered the energy impact score a bit, but I'm not sure it's enough to matter yet. I guess we'll know in a couple hours. Edit: 20 minutes in and I've watched my Time Remaining estimate creep up from 3 hours to 5.5 hours. Seems like a solid win so far (other than it looks like crap).
- greggarious 8y agoI use Firefox. I've found the big battery hit has come from streaming services (Netflix, Pandora, Spotify, Youtube, etc). One small change I made was streaming music to my phone, and that had a big impact. I know that streaming will use some battery life, but the amount of CPU being used by say, Pandora, was rather extreme.
- bmurphy1976 8y agoSure, those will kill battery usage, but that's not what I'm doing. Typically I'm bouncing between the browser with about 10 informational tabs open, terminal, and sublime text all day long. There's a night and day difference using Safari vs Firefox for just regular browsing. I'm not the only one who experiences this either, I have a coworker who complains about the same issue with his couple year old MBP. Firefox is a battery vampire.
- nextos 8y agoIt'd be interesting to monitor Firefox vs Safari using e.g. powertop. Using Linux, I get excellent battery life using Firefox. But it might be the case that safari is still much better, or that it behaves differently on macOS.
- pcwalton 8y agoNote that the GL context opacity issue is entirely macOS-specific and does not affect Linux.
- pull_my_finger 8y agoI wonder if it's DRM related?
- nathancahill 8y agoYes, unfortunately true. I'm a Firefox user, as loyal as they come, but put me on a long flight without the ability to charge, and you bet I'll be using Safari the whole time. The battery life is amazing.
- satysin 8y ago2018 MBP with i9 here as well. I am getting 10-11 hours battery life with Chrome. What exactly are you doing on your machine other than browsing as it isn't the browser causing such low battery life. Even when working in Xcode and IntelliJ I still easily get 7-8 hours.
- simongr3dal 8y agoScreen brightness makes a big difference.
- bmurphy1976 8y agoCompilation, screen brightness, docker, and slack are another significant chunk.
- bmurphy1976 8y agoFor anybody reading this after-the-fact, I was able to squeeze just shy of 6 hours out of my laptop with this change.
- greggarious 8y ago>I don't like encouraging mucking around in about:config, but I might as well mention this one. One issue fudging around with about:config presents could be increased fingerprintability. More battery life is cool, but will it come at the expense of an easily fingerprinted browser profile?
- pcwalton 8y agoThe opacity of the window OpenGL context is inaccessible to content.
- T-hawk 8y ago1) He's speaking in general terms. Some settings could quite possibly leak into fingerprinting, even if that particular setting doesn't. 2) Or does it? I could envision a timing attack in Javascript that can detect rendering speed accurately enough to determine if the window is being composited with transparency.
- markdog12 8y agoSorry to hijack this thread, but I noticed in your presentation (can't find it now) you could test out pathfinder with --features=pathfinder on Firefox Nightly. Any way to tell if this really enables pathfinder? I ask because I can't tell a difference on Windows or Mac (which may mean it's working as intended). https://github.com/pcwalton/pathfinder https://github.com/pcwalton/pathfinder
- agumonkey 8y agoI'd love a list of all tricks of this kind. I don't give a damn about visual acrobatics. Battery life and cpu usage on the other hand..
- pcwalton 8y agoThere deliberately aren't many tricks like this (I don't know of any others, in fact), because having to choose between aesthetics and performance is a terrible tradeoff.
- chias 8y agoI'm surprised this isn't enabled by default. Under what circumstances would you not want to enable this flag?