Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

energy impact ⚡️ #19

Closed
marclundgren opened this issue Nov 30, 2017 · 11 comments
Closed

energy impact ⚡️ #19

marclundgren opened this issue Nov 30, 2017 · 11 comments

Comments

@marclundgren
Copy link

marclundgren commented Nov 30, 2017

I just spent about an hour diagnosing my Atom's high energy consumption and narrowed it down to this package. Discord was not open when I ran these tests.

I've got about 40 community packages combined. The total energy consumption saved when I disabled this package was about 2700% more efficient with atom-discord disabled.

:(

@marclundgren marclundgren changed the title energy impact energy impact ⚡️ Nov 30, 2017
@marclundgren
Copy link
Author

Looks like we're polling a remote endpoint on this line, which is likely the culprit for a high energy impact:

https://github.com/HelloWorld017/atom-discord/blob/master/src/send-discord.js#L87

@marclundgren
Copy link
Author

A package configuration option for the poll interval (currently set to 3 seconds) is probably the easiest/quickest way to provide a solution that works for everyone.

@TheOnlyArtz
Copy link
Contributor

TheOnlyArtz commented Dec 1, 2017

Well, I won't target Atom-Discord but what I would do, Is opening an issue on Atom
We all know that Atom is not that good when it comes to CPU usage and performance in general but somehow we will never stop love this JavaScript masterpiece

Anyways, being with 40 community packages which I can tell that most of them are doing some front-end stuff
Will slowdown Atom nowhere near like backend work like Atom-Discord does. It isn't something new that backend is always slower than something that happens on your machine 😄
Hoped I've clarified some things

@TheOnlyArtz
Copy link
Contributor

Oh the interval you're talking about shouldn't be like that and I can agree on that. I will make a pull request and see how it goes.

@HelloWorld017
Copy link
Owner

HelloWorld017 commented Dec 1, 2017

Setting interval is already in settings (added at 4236d9a)
You can find it Behaviour > Update Tick

@TheOnlyArtz
Copy link
Contributor

That is still wrong @HelloWorld017 I'm making a PR right now to clarify things.

@TheOnlyArtz
Copy link
Contributor

#20

@HelloWorld017
Copy link
Owner

I really appreciate your contribution!

@TheOnlyArtz
Copy link
Contributor

TheOnlyArtz commented Dec 1, 2017

No problem, I'm just here to help some good ideas, glad that it is you to make it and not some guy who won't listen to his users

@TheOnlyArtz
Copy link
Contributor

@marclundgren I hope #20 will make your PC to feel better 😄

@TheOnlyArtz
Copy link
Contributor

@marclundgren @HelloWorld017 Can one of you close this issue please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants