Don't compile contract bindindgs we don't use#4324
Open
MartinquaXD wants to merge 6 commits intomainfrom
Open
Conversation
Contributor
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
Contributor
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
Contributor
|
The core idea makes sense to me, but is there a way we can automate this process? Otherwise, if someone runs generate it will overwrite this |
Contributor
Author
|
Contributor
True I was thinking of the forge thingy, nvm then |
jmg-duarte
approved these changes
Apr 10, 2026
Contributor
jmg-duarte
left a comment
There was a problem hiding this comment.
Seems to shave 2s on my end, but 10s in CI is very nice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Currently many contracts we use have many functions we don't use. Those result in a lot of code that gets compiled unnecessarily which is slow.
Changes
I moved the unused functions in the artifact ABI files into under a new key (
_disabled) which does not get parsed byalloyfor code generation. I decided to do that instead of deleting the functions entirely in case we need to use some of them in the future.This resulted in ~180K lines of net reduction. On my machine this reduced compile times of a clean rebuild from 69s to 63.7s. The effects on CI are 10s faster compilation of tests and likely significantly more savings when building the full image.
How to test
all tests should still pass