I think this is because you are not using EMTERPRETIFY_FILE. This was
missing in the wiki docs, I added mention of it now.

Basically, without EMTERPRETIFY_FILE we store the bytecode in the JS file.
This is convenient, and fine for small programs, but it is not an efficient
way to store binary data. On large projects a file is much better.

On Thu, Oct 1, 2015 at 1:43 AM, Markus Henschel <[email protected]>
wrote:

> Hi!
> I'm starting to use Emterpreter to be able to have blocking calls in C++
> code following the instructions here:
> https://github.com/kripken/emscripten/wiki/Emterpreter
>
> Everything works but I noticed that the code size increases a lot.
>
> normal: 1.830 KB
> with "-s EMTERPRETIFY=1": 3.300 KB
> with "-s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1": 3.360 KB
> with "-s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s
> EMTERPRETIFY_WHITELIST=['_main', .........]" ": 1.837 KB
>
> Other flags I'm using:
> -s NO_EXIT_RUNTIME=1
>
> I'm not recompiling any staticlibraries I use with "-s EMTERPRETIFY=1" as
> I thought those options are only important when producing javascript output.
>
> The link above states:
> "The emterpreter on the other hand has a guarantee of having smaller code
> size than normal emscripten output, simply because emterpreter bytecode is
> smaller than JS source."
>
> But I'm seeing an 80% increase! Am I doing something wrong? Is the
> statement outdated? Maybe there are some exceptions from the above rule
> that emterpreter bytecode is always smaller than generated JS code?
>
>
> Thanks
>
>
> Markus
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to