Hi Alon,
I am on the master branch. I probably don't understand the starting mechanisms. On loading, I do not want the program (main) to be called, so I set shouldRunNow and noInitialRun to false, without truly understanding what it means. Because I have no setStatus, doRun gets called but not main, so for the intended run later I have to set calledRun to false because main was actually never called.
The performance bug is probably fixing itself in the future.I should have given you a more detailed description earlier, sorry for that.
Checking the console log in FF for the second run I found the following line that probably explains everything:
--
[15:54:06.745] asm.js link error: As a temporary limitation, modules cannot be linked more than once. This limitation should be removed in a future release. To work around this, compile a second module (e.g., using the Function constructor). @
http://gaia.respawned.com/gaia.js:98973
Not necessary anymore, but here are the steps to reproduce this.
The fluid simulation is using the time-steps as main loop.
- switch to the "Run" tab and hit Start
- wait for two time steps, performance output always comes after TS 0.
- now hit "Pause", wait a few seconds (time step needs to finish)
- click "Reset", this will call the encapsulated compiled version again in the worker.
- click "Run" again and wait again for the first two time steps to finish. (it will take a lot longer now)
Cheers,
C