howardchung / jsminer

An experiment with in-browser distributed cryptocurrency mining
76 stars 30 forks source link

Limit client hash rate #1

Open 116-7 opened 8 years ago

116-7 commented 8 years ago

Hi,

Would there be a clear pathway to introducing rate limit functionality on the client script to reduce the workload of the script?

Thanks, David.

116-7 commented 8 years ago

And by workload I mean mainly CPU utilisation.

howardchung commented 8 years ago

Might be difficult since javascript is asynchronous. You'd probably have to replace the while loop with async.while (from the "async" library) and then use setTimeout.