kovacsv / occt-import-js

The emscripten interface for OpenCascade import functionalities.
GNU Lesser General Public License v2.1
141 stars 23 forks source link

emscripten: enable lto for reducing binary size #27

Closed kzhsw closed 1 year ago

kzhsw commented 1 year ago

https://emscripten.org/docs/optimizing/Optimizing-Code.html#lto

kovacsv commented 1 year ago

Thanks for the suggestion! Have you tried it? How much did it help?

kzhsw commented 1 year ago

Thanks for the suggestion! Have you tried it? How much did it help?

the original dist the original dist

lto build lto build

kovacsv commented 1 year ago

By using wasm-exceptions the file size is already lower, and with this setup the lto flag didn't have any visible effect on file size.