About '-fwasm-exceptions' to improve performance #122
Replies: 3 comments 6 replies
-
Yes, the performance degradation and file size impact is currently massive (as I mentioned in the thread over at the OpenCascade forums) when using non-native exceptions. Using native wasm exceptions, the performance & size impact of enabling exceptions is significantly lower. My opinion is to not enable native exception support in OpenCascade.js until there is stable support in current versions of Chromium, Firefox and Safari. Firefox was lacking support until very recently. If you want to enable native wasm support using However, it seems like the situation has changed. MDN says that Firefox now has "Preview browser support" for that feature, so I think it shouldn't be long until we can make the switch in OpenCascade.js. Depending on the application you're building, you might not need exception support. My opinion is that if you don't need exception support, you should (at least try to) disable it in your production application as this greatly improves size & performance, regardless of whether native or non-native exceptions are used. Exception support is only needed (I believe) if
|
Beta Was this translation helpful? Give feedback.
-
I tried to replace all the '-fexceptions'. The following error occurred while building the Docker Image.
But I didn't find DISABLE_EXCEPTION_THROWING. |
Beta Was this translation helpful? Give feedback.
-
I want to start with the official Opencascade cmake build. Do you have any experience in this field ? |
Beta Was this translation helpful? Give feedback.
-
"-fexceptions" causes significant performance degradation. When I disabled exceptions, the efficiency of testing 'ReadStep' improved significantly and was close to that of native C++.
However, the following discussion disabling exceptions is not recommended and can lead to logic errors.
Exception "Geom_BSplineSurface: Weights values too small" when reading STEP file
So I tried the '-fwasm-exceptions' compilation parameter as recommended. This resulted in a large number of errors leading to compilation crashes.
There are cases in OCCT code where setjmp and exception are used at the same time, so should we try to remove setjmp function?
Beta Was this translation helpful? Give feedback.
All reactions