woodcrust
(Oleh Hudeichuk)
April 17, 2018, 10:15pm
1
why wasm file on C compiled with emscripten have size ~ same as original
but Fire compiled module with size 4,6 Mb 0_0
how can I use Module2.wasm if he have on the start a size 4,6mb ?
emscripten:
Fire:
4,6 mb =(
maybe I understand something wrong ?
and please tell me yet what is RTL ? because without RTL - 2,3 Mb, but big too
ck
(Carlo Kok)
April 19, 2018, 5:04am
2
Hi, that’s mostly debug info and RTL. If you disable debug info it becomes about 500 kb.
woodcrust
(Oleh Hudeichuk)
April 19, 2018, 1:49pm
3
Thanks for you answer, tell me please, how can I disable debug info for minimum size of output wasm file ?
mh
(marc hoffman)
April 19, 2018, 2:09pm
4
in Settings, set Generate Debug Symbols to NO. Or build “Release”, which already has that off.
woodcrust
(Oleh Hudeichuk)
April 19, 2018, 2:12pm
5
build “Release” always gives me an error, so it’s better for me to configure the debug mode… ) Thanks =)
woodcrust
(Oleh Hudeichuk)
April 19, 2018, 2:28pm
6
I configured debug mode and make small refactor of the example code.
Total:
without RTL and debuf info - 571 Kb from a (swift) file size 313 byte
with small refactor the size has become 551 kb. So it is 20 Kb! less then it was.
And I only changed if let el == nill { … } to guard … else { … }. I will be to test yet, but it seems to me that this is a lot for this small changes.
ck
(Carlo Kok)
April 20, 2018, 5:25am
7
the 313 size is a bug (already fixed). The ~500 kb is still mostly the RTL and GC code. You can’t really avoid having that as it’s exposed to the Wasm side of things too. That said I’ll look into if we can reduce the size a bit more.