jSensors icon indicating copy to clipboard operation
jSensors copied to clipboard

performance issues when updating sensors

Open fynnfluegge opened this issue 6 years ago • 3 comments

I want to monitor hardware resources and output the values (temp, fan, load) onto a screen in realtime, which means fresh values at least every second. But I am wondering when I use JSensors.get.components(); it takes around 5 seconds or more. When I output values in realtime without calling JSensors.get.components(); every time the values are not refreshing... Is it not possible to stream hardware statistics in realtime?

fynnfluegge avatar Jun 10 '18 22:06 fynnfluegge

follow.

blindxfish avatar Apr 19 '21 17:04 blindxfish

This is fixed in https://github.com/profesorfalken/jSensors/pull/23

If you use JSensors.get.components(); it will still be slow, however if you do SensorsManager manager = SensorsLocator.get.getManager(EMPTY_MAP); and then reuse the instance like so Components components = manager.getComponents(); then individual call will be fast.

mprusakov avatar May 11 '21 09:05 mprusakov

This is fixed in #23

If you use JSensors.get.components(); it will still be slow, however if you do SensorsManager manager = SensorsLocator.get.getManager(EMPTY_MAP); and then reuse the instance like so Components components = manager.getComponents(); then individual call will be fast.

i use #23 but It took 6 seconds,how to improve the performance? pls~

RookieOHY avatar Feb 07 '23 06:02 RookieOHY