First I would make sure that the project is fully optimized. -O3 on source
to bitcode for each file, and -O3 when building all the bitcode to JS.

You might be able to split up the main loop into smaller pieces, and call
each asynchronously from the other (emscripten_async_call, etc.).

Profiling using the browser devtools might find why things are slow, it
could be something that can be optimized.

Otherwise, you can look at the emterpreter option to add an async wait
inside running code (emscripten_sleep), but it makes code run more slowly,
so it might not help in your situation:
https://github.com/kripken/emscripten/wiki/Emterpreter

Some old notes on asyncifying things are here, might be out of date though:
http://mozakai.blogspot.com/2012/07/bananabread-or-any-compiled-codebase.html

On Thu, Mar 31, 2016 at 11:16 AM, colombia <[email protected]>
wrote:

> hello my project is big...
>
> load files to start...
> inside use fopen and other file functions ...  exists a function as *DoEvents
>  *similar to VB?
>
> how not freeze browser with internal operations from my project?
>
> *is very big and not can minimize main loop function...*
>
> 1. how not freeze the browser?
> 2. how run in chrome more fast?
>
>
> thanks
>
> --
> 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