You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The module install functions used within app mgr assume that the install request has an app payload that has been parsed into sections, as if it has been received from a remote host. The module install function calls wasm_runtime_load_from_sections. It then destroys "useless sections" which seems to be everything except the code section.
If the module stored locally in flash storage (the module is not transmitted at install time), I don't technically need to parse the flash memory buffer into sections. I could just modify the wasm module install function to load the module directly from a byte buffer with wasm_runtime_load
Is there any measurable difference in terms of performance for loading wasm modules from byte buffers instead of from loading from sections? Am I wasting RAM by not loading into sections and allowing "useless sections" to be destroyed? I believe at least one difference is I will have to do memory management for the module buffer outside of the app manager.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am curious about differences between loading a module from sections vs from a byte buffer.
wasm-micro-runtime/core/iwasm/include/wasm_export.h
Lines 302 to 339 in 3875c66
The module install functions used within app mgr assume that the install request has an app payload that has been parsed into sections, as if it has been received from a remote host. The module install function calls
wasm_runtime_load_from_sections
. It then destroys "useless sections" which seems to be everything except the code section.wasm-micro-runtime/core/app-mgr/app-manager/module_wasm_app.c
Lines 748 to 760 in 2bac6a4
If the module stored locally in flash storage (the module is not transmitted at install time), I don't technically need to parse the flash memory buffer into sections. I could just modify the wasm module install function to load the module directly from a byte buffer with
wasm_runtime_load
Is there any measurable difference in terms of performance for loading wasm modules from byte buffers instead of from loading from sections? Am I wasting RAM by not loading into sections and allowing "useless sections" to be destroyed? I believe at least one difference is I will have to do memory management for the module buffer outside of the app manager.
Beta Was this translation helpful? Give feedback.
All reactions