Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed high memory usage #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pk910
Copy link

@pk910 pk910 commented May 4, 2023

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 :)

@J9B10
Copy link

J9B10 commented May 22, 2023

Excellent!
It worked really well here.
Now fixed memory overflow.

I thank.

I suggest a change:
Change the time interval from 1000 to just 10.
This improves execution speed dramatically.

@tansanDOTeth
Copy link

This worked well for me

@tansanDOTeth
Copy link

Excellent! It worked really well here. Now fixed memory overflow.

I thank.

I suggest a change: Change the time interval from 1000 to just 10. This improves execution speed dramatically.

I needed this for something, so I added a PR wth both the changes by @pk910 and your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants