Thank you. sam.
I changed the options as instructed and did the profiling.
After checking the results, I identified sections where time was being consumed.
Could *._emval_await be affecting this?
When compared to other projects, there is a difference in *._emval_await.
profile.html
{
"pid": 110007,
"subprocessPid": 110007,
"op": "spawn",
"targetPid": 110114,
"time":
1720413197.1,
"cmdLine": [
"/home/test/dev/emsdk/upstream/bin/wasm-opt",
"--strip-target-features",
"--post-emscripten",
"-O3",
"--low-memory-unused",
"--asyncify",
"--pass-arg=asyncify-asserts",
"--pass-arg=asyncify...@env.invoke_*,env.__asyncjs__*,*.fd_sync,*.emscripten_promise_await,*.emscripten_idb_load,*.emscripten_idb_store,*.emscripten_idb_delete,*.emscripten_idb_exists,*.emscripten_idb_clear,*.emscripten_idb_load_blob,*.emscripten_idb_store_blob,*.emscripten_sleep,*.emscripten_wget_data,*.emscripten_scan_registers,*.emscripten_lazy_load_code,*._load_secondary_module,*.emscripten_fiber_swap,*.SDL_Delay,
*._emval_await",
"--zero-filled-memory",
"--pass-arg=directize-initial-contents-immutable",
"test.wasm",
"-o",
"test.wasm",
"--mvp-features",
"--enable-mutable-globals",
"--enable-sign-ext"
]
},
{
"pid": 110007,
"subprocessPid": 110007,
"op": "
wait",
"targetPid": 110114,
"time":
1720413197.1 },
{
"pid": 110007,
"subprocessPid": 110007,
"op": "
finish",
"targetPid": 110114,
"time":
1720416042.543,
"returncode": 0
},