Replies: 2 comments 6 replies
-
Hi, v2 enables
I believe finishing a feature comes prior to optimizing it. Although when building I also noticed the size bump. I believe the binary size can be further minimized, but it requires someone who are very familiar with cpp, c, webassembly and those two repos. I probably will look further into it in the future. I also appreciate suggestions from @axxel and @gitlost if there're some stupid mistakes I make that causes some unnecessary size bump.
Yes I converted some of the bindings from emscripten enum or string to numbers, e.g., no stringification is needed when passing the barcode format between js <-> cpp. I believe this kills some unneeded functions. I am also curious about your use case. Currently, writer, reader and full are provided as three different exports in this npm package and unused code should be tree-shakable if you only use one of them to build something. I may have some blinding spots on how people use this package, so would you elaborate on how this will be a concern for you? |
Beta Was this translation helpful? Give feedback.
-
I plan to use the wasm writer in Deno Deploy along with various other tools and I don't want to hit any memory limits. Not a huge concern at the moment but the jump in size surprised me so I figured I'd reach out to learn more. |
Beta Was this translation helpful? Give feedback.
-
according to the readmes, the writer wasm binary size goes from ~366 KB to ~1.17 MB
that seems to me to be a big jump; is there a way to reduce that or is there a need for it to be so much larger for the writer?
(the reader is slightly smaller in v2 beta 3)
Beta Was this translation helpful? Give feedback.
All reactions