4 ms·
When I start wondering why my laptop fan keeps spinning or why the battery keeps being drained even though I'm not doing anything resource-intensive on the fore
by Delk 5y ago
When I start wondering why my laptop fan keeps spinning or why the battery keeps being drained even though I'm not doing anything resource-intensive on the foreground, the culprit usually turns out to be a web browser, or a web page that keeps spinning the browser's wheels for some reason.
I guess that might be a part of the problem: the root cause is often somewhere else than in the (traditional, non-javascript) application that you're running on your desktop. Although I imagine browsers would do something to avoid unnecessary resource use when a page is not active, it's harder to entirely prevent it without potential side effects when the "data" of your program can essentially be an application of its own running within your platform. To make applications behave well on idle, you'd have to involve web developers, and their priorities are ultimately dictated by their bosses and clients, too.
Other than that, I wholeheartedly agree that it would be better to not have code that consumes unnecessary resources in the first place than it would be to try preventing it downstream.
The only other applications that I regularly find using multiple percent of CPU time when not in active use are Thunderbird and Steam. I have no idea what's going on with Thunderbird or why it's doing that. Some other applications may have some unnecessary background activity as well, and it might be nice not to have that, but it's usually not particularly heavy. The powertop era you mention may have helped with that.