dunklesToast / XMRigFrontend

Simple Material Design Frontend for XMRig
http://xmrig.dunklestoast.de/
40 stars 15 forks source link

Minimal fix to reduce update frequency #6

Closed paulie-g closed 6 years ago

paulie-g commented 6 years ago

I was having the same problem as @zhucc in #5

I'm not familiar with javascript at all, but what you had going on was a busy-loop in the update function somehow, resulting in a massive slowdown of the hash rate when hasing using cpu. In any case, this patch now uses setInterval instead of setTimeout and responds to changes in update times correctly.

Ideally, this would be in its own function and there would be one spot in the code where it needs to be changed (or even a way to do it in the interface). It would be nice for updates to be triggered when adding/removing rig configs as well. However, here I just fixed things in the smallest possible patchset.

dunklesToast commented 6 years ago

Fixed it in Code already - anyway thank you!