perf: Fix cloning of executor#4955
Conversation
fbf620e to
871dbcf
Compare
871dbcf to
99a3113
Compare
|
so this comment was correct until executor wasm was added to snapshot. Was using |
|
yes, I know that. What I'm saying is if you can directly serialize/deserialize the |
99a3113 to
f2f2c5e
Compare
Changed to serialize |
9acb399 to
23648bd
Compare
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
23648bd to
39befad
Compare
* perf: Fix cloning of executor * Serialize `wasmtime::Module` directly for snapshots --------- Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
|
I think changing to EDIT: docs to |
| // SAFETY: `Module::deserialize` is safe when calling for bytes received from `Module::serialize`. | ||
| // We store serialization result on disk and then load it back so should be ok. |
There was a problem hiding this comment.
I think we can't guarantee that...
How can we end in this situation that we serialize with one and deserialize with another version of |
@mversic update of iroha version which in theory should preserve backward compatibility for block store and snapshot. |
|
So we should change back to |
|
Opened #5009 |
Description
I am debugging tps of a single peer (#4727), measured performance of
Sumeragi::try_create_block, and noticed that executor cloning takes about 25% oftry_create_block. This is because ofLoadedExecutor::raw_executorwhich was added for snapshot creation. Could be fixed by addingArc.It is also interesting that other wasm-related code takes a lot of time, e.g.
wasmtime::Linker::instantitateandwasmtime::Store::into_data.Linked issue
Related: #4727
Benefits
Slightly optimize block creation performance
Checklist
CONTRIBUTING.md