bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

CPU utilization is 100% #217

Open aqeel-ahmad-plc opened 5 years ago

aqeel-ahmad-plc commented 5 years ago

i have an issue while using guages.min.js library. The issue is that cpu utilization gradually increases with meter initialization and reaches 100% which crashes chrome browser. I am using RPI3B+ using linux OS.

kplindegaard commented 5 years ago

Well, it will of course consume some resources, particularly during the animation phase. When the animation ends, CPU consumption goes to zero again as you would expect.

@aqeel-ahmad-plc It's a bit difficult to guess what your problem is, since you didn't provide any sample code or give me something to work with. My interpretation of what you say is that you instantiate a relatively large number of gauges and they update/animate all at the same time. All I can offer is a suggestion to reduce the animationSpeed setting to a minimum.

// Assuming you have created the gauge object already
gauge.animationSpeed = 1;