Hyperline / hyperline

✨ Status line plugin for Hyper ✨
MIT License
619 stars 120 forks source link

Win7 100% CPU usage #124

Closed jerodg closed 6 years ago

jerodg commented 6 years ago

Using windows 7 when I load the plugin, cpu usage spikes to 100% and stays pegged, however, no particular process can be found in task manager to associate that usage with.

corbin-r commented 6 years ago

Hmm could be related to #114 🤔

You can try modifying src/lib/plugins/network.js:L49 thus:

  componentDidMount() {
    this.getSpeed()
    this.interval = setInterval(() => this.getSpeed(), 2500)
  }

I'm currently working on a fix that doesn't involve having to modifying the actual code.

pratikone commented 6 years ago

I am facing the same issue. Turning every setInterval to 5000 or more solves it. Even though there might be a bug, but having 500 ms for CPU status might be un-needed in most of the cases. Do you think changing it to 1000ms or more should be a good default for most of the users ?

corbin-r commented 6 years ago

@pratikone I agree, I think 1k-5k milliseconds would be sufficient. I don't see a need to have the network plugin update every 0.5 seconds.