"Apps Using Significant Energy"


#1

When I look at the battery for my laptop, its says that Atom is using significant energy. I’m just editing text!

Any ideas about this? Is anyone else experiencing this?

Thanks


Computer gets warmer when using Atom
Having issues with excessive battery drain even when idle
#2

I bet if you use Chrome, it also appears in the “significant energy” list on the OS X battery menu item. Atom is based on Chromium, the open source underpinnings of the Chrome web browser. As such, it does use a lot more resources than something that was purpose-built for text editing in a systems programming language such as C/C++/Objective-C or even Java.

On the flip side, you can see my post, linked below, for some of the benefits that building on top of Chromium and other Web technologies brings:


#3

Sure, being based on chromium is a factor, but Atom is using significantly more energy than Chrome, even when just (in theory) idling in the background.


#4

Definitely there is work to be done. I just think that realistically so long as Atom is built on top of Chromium, Atom isn’t going to consume significantly less energy than Chrome itself.


#5

And especially written in javascript instead of C++, which may be what you meant.

Improving Atom’s speed performance is high-priority and that means the number of instructions executed will be reduced which means less power. But I doubt we will see much over a factor of two improvement in the long run.

I think this falls in the category of better modern software using more and more resources which sells better modern hardware.


#6

The point is that idling Atom is using two orders of magnitude more energy than idling Chrome. There will probably be some low-hanging fruit for optimizations.


#7

Actually it is the average that affects battery life which is only a factor of 3. I’ll stick to my estimate of 2.


#8

Average takes into account the time I was using it, while current keeps stable when both apps are idling in the background and provides a good baseline.

Also, when atom is started with --safe with three windows open, and it’s not the active app, the impact is still hovering at ~10. Chrome running in the background shows ~2.


#9

So you have a problem with the current usage and not the battery life? What is the problem with current usage? The only test that makes sense for battery usage it to clear the counters (?), use it in a normal manner, and check the average.


#10

Might be a naive solution, but I switched to “Experimental filesystem watching library” in the preference (Atom 1.33.0) and it reduced the energy consumption significantly. I also don’t have any project folder loaded when I code without power connection. No more burning hot macbook on my lap while coding :slight_smile:

Hope it could be of use for others as well!


#11

I don’t know much about that specific feature, but it’s probably not a naive solution. The devs are constantly working to reduce Atom’s clunkiness as much as they can without removing any of the features that weigh it down and make editing in Atom a pleasurable experience. New background features and reworked algorithms should each contribute to less power hunger, and anyone who has persistent issues with Atom’s performance can follow the beta releases as well as any experimental upgrades to get those tweaks as early as possible (being aware, of course, that Atom might be less stable than usual because of the experimental stuff).


#12

@DamnedScholar I think you misunderstood my intentions. Naive here only reflects users’ perspective at the level of common usage, and not intended to degrade the works of devs. Rather, I’m thankful for them for this experimental feature. I’m sure there are lots of people who have similar issues and I just hoped this report may be useful to them which is simple.


#13

I think I understood you. I was saying that it wasn’t naive for you to use that feature and report better results. That sort of feature upgrade should cause that sort of positive result, in cases where the old file watching method was using up more resources than the new one. Instead of being naive, it was savvy of you to turn on that feature since you are someone who benefits from the change (it doesn’t really matter for desktop users, since they’re plugged into a house), and other users with similar needs should pay attention to features like that one.


#14

@DamnedScholar Awesome.