-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
emscripten: use wasm-exceptions for better performance #29
Comments
Hello, Can you please share your .stp? |
No, it's commercial stuff. During a quick look of OpenCascade code, I found that c++ exceptions are widely used in it, so using wasm-exceptions should improve the overall performance by reducing wasm-js calls, not limited to specify model. |
@kzhsw I managed to compile the library with |
Thank you for this, I'll try to find a model that can be uploaded here. Could you upload the compiled binary here, or benchmark it with some smaller models? |
Some measurements for files I got at hand. It's definitely faster, but I guess the difference depends on the number of exceptions coming from the import.
|
@kzhsw even if it doesn't solve your problem it's definitely better than it was before, so I committed the new compiled version. Please check it with your file. |
Thank you for this great work! Also note for best browser compatibility, both version should be compiled, and load the supported version based on browser version check or wasm-feature-detect. |
Browsers and node.js supports this feature for more than a year, I think it's fine to have only the new version. |
Using this project to parse a large (~80MB) stp file, I waited for more 4 hours but it wouldn't finish, when I pause the script in devtools, it stops at some js glue code generated by emscripten, which is supposed to be exception handling.
The docs said wasm-exceptions should be faster, but I failed to compile it.
The same model took about 2 minutes to be converted to gltf using mayo, which is a native app using the same OpenCascade to handle stp files.
I had tried foxtrot on browser, but it just failed.
Other useful links:
The text was updated successfully, but these errors were encountered: