Do not assemble deployedObject
when not requested
#15746
Labels
low effort
There is not much implementation work to be done. The task is very easy or tiny.
low impact
Changes are not very noticeable or potential benefits are limited.
performance 🐎
should have
We like the idea but it’s not important enough to be a part of the roadmap.
Currently the runtime subassembly is always created if present, even if the
evm.deployedBytecode
/--bin-runtime
output is not requested. It happens even when this output is not available, e.g. in command-line Yul mode. While this is not the slowest part of the pipeline, it's still a fair chunk of unnecessary processing that may add up in big projects and could be completely avoided.Details
We have two separate places where this happens:
CompilerStack::assembleYul()
for Solidity compilation (note that despite the name, this handles the non-IR assembling as well; we should rename the function).YulStack::assembleWithDeployed()
for pure Yul compilation.We should make the deployed
LinkerObject
and optional result and only generate it when requested.Note that code generation, optimization and Yul->EVM transformation is already being reused, because creation and deployed assemblies are a part of the same object tree. It's just the final assembling step that is performed independently.
The text was updated successfully, but these errors were encountered: