EMSCRIPTEN freeze my browser FIREFOX and very slow in chrome

159 views
Skip to first unread message

colombia

unread,
Mar 31, 2016, 2:16:50 PM3/31/16
to emscripten-discuss
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

Alon Zakai

unread,
Mar 31, 2016, 2:22:19 PM3/31/16
to emscripten-discuss
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

--
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 emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

colombia

unread,
Mar 31, 2016, 8:06:54 PM3/31/16
to emscripten-discuss

Thanks 4 u reply

Gracias  por las respuestas 
Reply all
Reply to author
Forward
0 new messages