-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Performance issues of solc --abi --via-ir
#14917
Comments
It seems that this is not the case when compiling with |
That's odd. Looking at how How much slowdown are you seeing? Is the repro big enough that the slowdown is not just caused by some small constant factors? |
For the same command with different flags I am getting those results: Could it be the case that solidity/solc/CommandLineInterface.cpp Line 848 in e11b9ed
|
Well, your numbers show that it clearly must be triggering compilation in this case, but it does not seem to be due to the code in this spot at least.
This comment is outdated. We should remove it. Looking at the original context, we used to just unconditionally compile everything: solidity/CommandLineInterface.cpp Lines 249 to 255 in df82e26
Nowadays we decide based on the output flags whether to compile so that TODO has actually been fulfilled. |
Looks like this condition is probably the culprit:
|
After figuring out what causes it the fix is actually trivial so I created a PR: #14926. And this indeed does not affect Standard JSON - which in unexpected since the fix is in We should really unify the two, because it results in just such odd differences in behavior, but for now I stopped at just fixing the issue at hand. |
Description
It seems that requesting only ABI as output significantly speeds up compilation process which is useful when you don't need anything besides ABI or want to determine files which should be compiled depending on the contracts ABI.
Speed up in case of
solc --bin --abi
vssolc --abi
is great, without--bin
it is ~20 times faster on the project I am experimenting with.However, for some reason
solc --abi --via-ir
runs much longer thansolc --abi
orsolc --bin
. I assume it's because of certain compilation steps not being skipped in IR pipeline which are getting skipped in default compilation mode.The text was updated successfully, but these errors were encountered: