8 ms·
Maximum battery life depends on the CPU being idle most of the time. Running an app that constantly uses the CPU will greatly shorten battery life. A web page c
by mikeash 11y ago
Maximum battery life depends on the CPU being idle most of the time. Running an app that constantly uses the CPU will greatly shorten battery life. A web page constantly running code will make the browser constantly use the CPU.
So... great? All true, but why is this on HN? This is the sort of tip which belongs in a "...For Dummies" book.
- Aeolun 11y agoI think it is more that this particular tab was somehow responsible for eating half of his battery life. It's not particularly clear that that particular page would consume an an insane amount of CPU/Battery.
- mikeash 11y agoI'd hope it would be quite clear to this audience. Intensive tasks can eat far more than half your battery life. My MacBook Pro goes from 8+ hours of battery life to less than 2 if I run certain (not particularly fancy-looking) games, for example. The difference between idle consumption and maximum consumption is gigantic, which in turn implies that your battery life can be massively impacted by consistently going beyond idle. Again, all true, but I don't understand why it's here.
- primozcigler 11y agoYes. But sometimes you will open up a website in a new tab. It won't be happening nothing special there, as least not visually. So you will assume it doesn't hurt performance/battery of your laptop. But if the developer of that site left somewhere in JS something like while(true) {...} that page will drain your battery, even if you're not looking at that specific tab. And even if you are in other app than Chrome.
- mikeash 11y agoAgain, true. But why is that worth posting here? This is Computer Use 101 material. That doesn't mean it's not valuable to some people, but for this particular audience it's about as obvious as "water your plants if you want them to grow" would be on Farmer News.
- heinrich5991 11y agoI haven't connected battery life to opened tabs before. There, this link was worth something to me.
- knodi123 11y ago> if I run certain (not particularly fancy-looking) games, for example I like to play FTL, and it makes my laptop sound like a vacuum cleaner, with a 1.5 hr battery life. And that's a freaking turn-based roguelike. But I can run an old SNES emulator for an hour and barely touch my battery. Go figure.
- primozcigler 11y agoExactly. The point is that even if you have 100 tabs open, maybe only 1 will eat 80% of CPU and other 99 will require the rest 20%. My point was that you cannot simply see the things clearly from the Activity Monitor. And many people are not aware that the Task manager exists in Chrome.
- xlayn 11y agoWhy the Mac reference? last time I check anything from my ipaq to my nokia maemo to my ROG laptop to my thinkpad to my arduino behave the same way: they drain more power the more work they do. Which is all again related to summatory of work over time = power consumed, same for humans, for ICE and electric motors... I'm starting to think there is some troll creating entries with apple products just for the sake of almost divine apple status. Edit: yay downvotes because I don't respect Mac cult. Get over it; it's a Pc!
- mikeash 11y agoEr, they mentioned the Mac because that's what they were using? It's a personal story of discovery. It's just weird here, because it's discovering something so basic.
- xlayn 11y agoIt doesn't add anything, a Mac is a pc, there is nothing special on it, it's related to something happening inside the browser, so for discovery sake he can post I 100x increase my Mac battery by putting it to sleep. This post is newbie in all senses. He could get a console over the webpage, check the javascript or offending logic and create a post like this: Increase your users happiness (and battery life) by improving XYZ (e.g. polling behaviour) on your webpage. -Improving responsive design with battery life in mind which identifies a problem and propose a solution.
- primozcigler 11y agoI will do that probably within a day or two.
- teh_klev 11y agoFrom the guidelines: "Please resist commenting about being downvoted. It never does any good, and it makes boring reading." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html there's also a FAQ if you haven't read that either: https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html That aside, I'm unclear why so you're riled up about mentioning their Mac in the title. If I were to write such an article I'd probably have written "How I doubled the battery life on my Dell XPS by literally closing one tab in Chrome".
- sophacles 11y agoSo HN is a great community full of smart people. It attracts new people all the time. Further the larger tech community is a "young" field. As a result of both, there are people who are just learning this, or at a point in their personal growth that this stuff is just clicking or needing to be pointed out. It's OK - those folks need to learn too and articles like this are great for them. Further software is a gigantic field. There is stuff that is basic to one person that is voodoo to someone else. This is usually bi-directional: things that are basic to you are voodoo to me, and things that are voodoo to you are basic to me. That's another reason this belongs here. And if nothing else: I suspect there are many people, such as myself who know that some browser tab is responsible for my mbp being warm, or eating battery, but just put up with it for convenience reasons. Until today that is, when we learned about the chrome per-tab task manager tool.
- mikeash 11y agoI'm sure there are some people reading this site for whom this is news, but that doesn't change my point. It's extremely basic information that's more appropriate elsewhere. I don't want the front page to be full of articles like "how to declare a variable" or "what even is a variable" or "how to plug in your monitor." I'm sure there are some people reading this site who don't know how to plug in a monitor, but that doesn't mean such a thing would belong here.
- rquantz 11y agoAll right you made your complaint. Now flag the article if you must and let it go, please.
- losvedir 11y agoI didn't know about the Task Manager in Chrome. I've used Activity Monitor before to see that some tab was eating CPU, but I didn't know it was so easy to identify which tab. The article was worth the read to me for that tidbit alone.
- mikeash 11y agoThe solution is one Google away. "Which Chrome tab is eating CPU" and first hit. I accept that this is valuable information, but HN is not really about obvious information that's easily searchable.
- ksk 11y ago>So... great? All true, but why is this on HN? This is the sort of tip which belongs in a "...For Dummies" book. Because apparently the kind of people who spend the most amount of time idling/voting on tech websites and are newbies.
- whiddershins 11y agoI dunno man, I'm pretty savvy in general but didn't know you could find process usage per tab in chrome. I was hoping the top comment here would be interesting, like it would be about why exactly the currency conversion page is so processor intensive and how to make the same exact functionality without that problem. But, no, it's a discussion about a discussion.
- logicrook 11y agoAlthough this is not great information, there are way worse submissions that make it to the front page. The useful thing with this article is that it tell one cannot really estimate the battery usage of a user, even knowing much of his habits. I think the reason is that HN readers (most people?) are great gobblers of "fun fact" information. Just look at how many random mostly useless trivia makes it to the front page...