VanityEth
VanityEth copied to clipboard
fixed high memory usage
I've implemented a fix for #39 as I ran into the same problem. The underlying problem for this high memory consumption is, that nodejs only runs its garbage collector as a subtask. This subtask is never executed when running a endless loop.
To resolve the issue I've changed the worker implementation to run via a interval instead of a blocking while(true) loop.
The VanityEth.getVanityWallet
now stops after a given amount of time, so it's not blocking forever, but gets recalled from the interval almost immediately.
I'm running it on a server for a few hours now. It's consuming max CPU, but doesn't go above ~70MB memory anymore :)