imjacobclark / github-notifier

Chrome notifications for GitHub
MIT License
40 stars 9 forks source link

Configurable refresh rate, or try to reduce bandwidth usage overall #5

Closed jlogsdon closed 8 years ago

jlogsdon commented 8 years ago

I spent some time trying to figure out what part of chrome was using ~200kb of bandwidth every couple of seconds and found out it was this plugin. I only had 5 repositories added, so I was surprised to find this was the culprit.

If there's no way to use the Github API in a more efficient way, at least the refresh rate should be configurable.

edit: At a minimum, call setTimeout(update, interval) after each update instead of using setInterval. The former will take request and response handling time into account.

imjacobclark commented 8 years ago

I think a configurable option for the refresh rate is the best approach for this, and as you suggest, setTimeout.

I'll take a look at this today/tomorrow.

imjacobclark commented 8 years ago

@jlogsdon

This should be resolved in https://github.com/imjacobclark/github-notifier/releases/tag/1.9.

Could you please verify this works as expected?

jlogsdon commented 8 years ago

Works great, thanks.