when open file in read mode (wasm platform) node is taking too much execution time?

11 views
Skip to first unread message

Kiran Pawar

unread,
Apr 6, 2023, 6:42:04 AM4/6/23
to emscripten-discuss
I have compiled c code which has code to opening file in read mode using emcc compiler. C code has implementaion of mounting file system using NODEFS and after compiling it will produce a.out.js, a.out.wasm files
after running it will taken too much time to complete the execution,

so i am checking the profiling result like this,
$node --prof a.out.js input.txt

The profiling result like,
JavaScript     12.70%
C++                 10.70%

GC                    4.30%

Shared libraries 76.20%

Unaccounted   0.4%


and inside Shared libraries,
node                 69.5%
libc-2.31.so      6.5%
libstdc++.so.6.0.28  0.0%
 
node is taken around 69% execution time.
so why node is taken so much time?
or is there any other way i can open local file in read mode?
Reply all
Reply to author
Forward
0 new messages