Chrome does stutter quite a bit, it must be noted, which offers a bit worse a gameplay experience. Load the URL. Wait for the initial data fetch, then click on the first game button. Once the game starts, observe the fps in the upper right corner. Well, actually, in the case of IonMonkey you don't need to pay too much attention to the FPS since the game is essentially non-functional. Game is a cross-compile using emscripten.
I see this too (32-bit linux). 1fps in latest ionmonkey nightly, 15fps in regular nightly.
The main problem is that we are JM-compiling the same script lots of times, filed bug 785986 to avoid this. There are also many JM stub calls for "x >>> 0" when the result does not fit in an int32. Ion currently takes a bailout but should just handle this inline without any stub calls (bug 785974 and bug 750947).
I bisected this. It regressed due to bug 774253, specifically changeset: 104950:01854460aa68 user: Brian Hackett <firstname.lastname@example.org> date: Sat Aug 25 06:29:43 2012 -0600 summary: Tweak condition for triggering Ion compilation from JM, bug 774253. r=dvander https://hg.mozilla.org/projects/ionmonkey/rev/01854460aa68 That changeset also regressed two other Emscripten-compiled projects, OpenTTD (http://play-ttd.com/ , stalls before getting to load screen, was about to file a bug) and BananaBread (bug 786026, which I will now dupe on this one).
Further testing shows that another compiled project, Me & My Shadow (http://syntensity.com/static/mams/mams.html , stalls during LZMA decompression in worker) was also regressed by that changeset.
Created attachment 655830 [details] [diff] [review] bandaid The real fix for this is bug 785986, but in the meantime this patch avoids repeatedly recompiling / discarding code for the same script in JM by not inserting Ion compilation checks if the script has already been compiled for Ion, as will happen if script->ion->bailoutExpected().
I haven't checked this against any of the Emscripten projects, but in the shell this fixes pdf.js in the octane benchmark which was suffering from the same problem Jan identified in comment 2. So I assume this is the same issue, but let me know if performance is still broken anywhere. https://hg.mozilla.org/projects/ionmonkey/rev/91493e20a6e5
I built with the patch, and checked all the emscripten projects. Everything looks great!