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

chore: avoid cloning CompileOutput to parse inline config #5683

Merged
merged 6 commits into from
Aug 21, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Aug 20, 2023

Motivation

Cloning = slow

Cloning compiler output (TWICE) = incredibly slow

Please do not do this :)
We're talking 150ms for a forge init project, going into the seconds PER CLONE for big projects.
Benchmarked with AMD Ryzen 9 5900X (24) @ 3.700GHz

Solution

Don't clone

@DaniPopes DaniPopes marked this pull request as draft August 20, 2023 21:56
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing, needs ethers bump

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just sick stuff.

@DaniPopes DaniPopes marked this pull request as ready for review August 21, 2023 15:25
@mattsse mattsse merged commit a6bd607 into foundry-rs:master Aug 21, 2023
@DaniPopes DaniPopes deleted the opt-inlinecfg branch August 21, 2023 17:20
mikelodder7 pushed a commit to LIT-Protocol/foundry that referenced this pull request Sep 12, 2023
…rs#5683)

* chore: avoid cloning `CompileOutput` to parse inline config

* chore: clippy

* use new solc methods

* chore: bump ethers

* chore: clippy

* fmt
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