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

fix: fix perf bug in mox compile #159

Merged
merged 3 commits into from
Nov 19, 2024
Merged

fix: fix perf bug in mox compile #159

merged 3 commits into from
Nov 19, 2024

Conversation

charles-cooper
Copy link
Collaborator

@charles-cooper charles-cooper commented Nov 18, 2024

the pickling/unpickling of the VyperDeployer was a perf bottleneck. it's not used, so don't return it from the subprocess

fix a perf bug in mox compile. `compile_` was returning the deployer,
which pickles it to the process's stdout. however, this is not necessary
as the result is not used.

on my machine, this brings warm compile of 36 contracts from 5s to 2.2s.
@PatrickAlphaC
Copy link
Member

Hmm... We use it in inspect.py to inspect contracts from the command line.

Should I make a new function called like compile_and_return which returns the value? Or is there a more clever way to work around this?

add a wrapper for use by multiprocessing which discards the result.
@charles-cooper
Copy link
Collaborator Author

Hmm... We use it in inspect.py to inspect contracts from the command line.

Should I make a new function called like compile_and_return which returns the value? Or is there a more clever way to work around this?

97182ed

@PatrickAlphaC PatrickAlphaC merged commit e58cb35 into main Nov 19, 2024
2 checks passed
@PatrickAlphaC PatrickAlphaC deleted the fix/compile-multi branch November 19, 2024 19:44
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.

2 participants