-
Notifications
You must be signed in to change notification settings - Fork 336
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
Benchmark and optimize analyze call #2033
Comments
After adding some more of the In there it steps through the function body byte-by-byte and validates that it's well-formed. Makes sense that we have that step. Since that is part of Bytecode Alliance's Some bench examples when removing the validation of the function body:
As apparent from the benches, we see an ~80% improvement in performance across the board and are comfortably entering the low three-digit microsecond territory. |
Something we can do to improve this is pull out the function validation into a separate step. Then
|
Makes sense, will look into that. I also managed to get some performance improvements (averaging at ~22%) by parallelising the function body validation (without reusing the allocations from the validator since that would add locking overhead) |
During manual testing I realized that analyze can be a bit slow, depending on the contract. This might be due to a heavy
ParsedWasm::parse
or maybe even due to loading the whole Wasm from disk at once.In CosmWasm/wasmd#1813 we start exploring first steps towasds mass migrations. In order to ensure
MsgMigrateContract
is performant (dozens, maybe hundreds of migrations in a block), we also need to ensure that the Analyze call is fast.analyze
for different contractsThe text was updated successfully, but these errors were encountered: