-
Notifications
You must be signed in to change notification settings - Fork 56
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
Performance of React SSR #57
Comments
sorry, node have jit, but wasmedge_quickjs.wasm not. |
Could something like https://github.com/bytecodealliance/wizer help with pre-compiling? |
@manuschillerdev I want to make sure that you did |
@juntao that massively sped things up! wasmedgec target/wasm32-wasi/release/wasmedge_quickjs.wasm target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm
cd example_js/react_ssr/
hyperfine "wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js" "node dist/main.js"
Benchmark #1: wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js
Time (mean ± σ): 195.1 ms ± 2.2 ms [User: 144.3 ms, System: 46.0 ms]
Range (min … max): 192.5 ms … 200.2 ms 15 runs
Benchmark #2: node dist/main.js
Time (mean ± σ): 55.6 ms ± 1.3 ms [User: 43.2 ms, System: 9.5 ms]
Range (min … max): 53.0 ms … 58.5 ms 49 runs
Summary
'node dist/main.js' ran
3.51 ± 0.09 times faster than 'wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js' now it's only 3 times slower than the native node process - roughly 10x faster than before :) Could this be improved even further? EDIT: this could be added to the readme as well - in case I didn't just missed it |
Although the React App is very small, the performance of rendering it via wasmedge-quickjs is rather slow, compared to rendering it via a local node process:
Are there any options to improve the performance for SSR in wasm?
The text was updated successfully, but these errors were encountered: