Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

fixed high memory usage#40

Open
pk910 wants to merge 1 commit intoMyEtherWallet:masterfrom
pk910:memfix
Open

fixed high memory usage#40
pk910 wants to merge 1 commit intoMyEtherWallet:masterfrom
pk910:memfix

Conversation

@pk910
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

This worked well for me

@tansanDOTeth
Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants