I'm seeing great performance with USE_PTHREADS mode in Safari Technical
Preview, but in Firefox Nightly (and Developer Edition) performance seems
really spotty. My use case is video decoding, so everything's got to be
done within 15-35ms so frames can be drawn on time; like games it's very
sensitive to latency problems.

Somewhat worryingly, I notice the error console is tossing up these
warnings in Firefox:

  TypeError: asm.js type error: asm.js Atomics only enabled in wasm test
mode

Everything still works though, just with a lot more latency than I expect.

The code in libvpx I'm running does have some usage of setjmp/longjmp for
error recovery, but if I try stubbing it out I don't see any obvious
changes to the performance. Threads are pre-spawned.


Sample URL using pthreads:
https://brionv.com/misc/ogv.js/demo-mt/#file=Knowledge_for_Everyone_(short_cut).webm&player=js-mt&size=480p.vp9.webm&source=shortlist-vp9

Sample URL single-threaded (using a background worker):
https://brionv.com/misc/ogv.js/demo-mt/#file=Knowledge_for_Everyone_(short_cut).webm&player=js&size=480p.vp9.webm&source=shortlist-vp9

In Safari Technical Preview I see a significant speedup with pthreads, as
shown on the cyan bars on the performance reporting graph, but in Firefox
performance is often much worse than single-threaded and it drops frames.

Tested on 2-core and 2-core/4-thread machines. Firefox behaves similarly on
Mac and Windows.


Any known issues I should watch out for? Thanks!

-- brion

-- 
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