Closed Bug 988119 Opened 8 years ago Closed 8 years ago
Plugin whitelist request: gradecam
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Request for whitelist → Plugin whitelist request: gradecam
Whiteboard: application complete
25x slower than native is about 10x slower than I would expect based on other emscripten benchmarks and applications we've ported. Unless the C++ is extremely multithreaded of SIMD-capable? Even so, that is very surprising. Can you make a standalone benchmark of the performance-critical part of this codebase, and I'll investigate that? Hopefully there is a small problem here that can be fixed.
There is about a 5-10x performance difference when building natively between debug mode and our release options, and we optimized our code to take advantage of performance boosts from -ftree-vectorize. While I have enabled that in our emscripten build and I'm using -O3 I suspect it doesn't help nearly as much in JS. There is a *lot* of processing of byte arrays, both integer and floating point math, etc. Unfortunately the performance-critical part of the codebase is the most sensitive part of our intellectual property and I don't know that we can make it available to an outside party. We'd love to be able to provide partial functionality without requiring a plugin but we'd need to improve the speed by about 10x in order to use this even for basic scanning. I will talk to the CEO and see if there is any way we could produce similar or stripped down code that would let you play with optimizations without giving out our full code. I don't know if he would consider some sort of NDA to release the core technology or not, but I strongly suspect that he would not.
Ok, hopefully we can get access to the code to try to help here. Otherwise, please take a look at https://github.com/kripken/emscripten/wiki/Optimizing-Code and in particular the last segment on troubleshooting that was just added, that might be helpful.
Yes, I spent several hours looking over that page and trying different optimization options yesterday =] I haven't tried it on a bunch of different browsers yet; in fact my tests were just in node.js, but I somehow suspect it won't be a 10x speed difference. All the same, I will attempt it and let you know if I find anything surprising there.
If you tested only in node.js, then you may easily see a huge speedup in the browser. First of all in firefox because it has specific asm.js optimizations that node.js does not do, and also because node.js tends to lag behind v8 development, even if you used the very latest node (and especially if not).
Ok good, that is about what I would expect. A 4x slowdown is worse than the usual 2x, but makes sense given you said the code vectorizes well in native builds. Note that work on SIMD is progressing for JS, so eventually that speedup will not be lost. (I am surprised though that Chrome and Safari are so slow. If possible, it would be good to file a bug on them, but I guess that might be hard to do here.)
I got back and found that Safari had finished. 2587.115 seconds.
So in related and weird news, later on after having restarted Chrome, etc I tried again and this time Chrome took 15 seconds, significantly faster than Firefox. Very weird, but very nice as well.
Whiteboard: application complete → application complete - accepted
Builds for testing are now available at http://people.mozilla.org/~bsmedberg/plugin-whitelisting-91f6f3380041/ Please do a QA pass using a new Firefox profile to ensure that the plugin activates without a popup and appears as "Always Activate" in the addon manager. Report back in this bug when QA is complete. Please try to complete QA by the end of this week.
Fixed for Firefox 30 beta in bug 992995. Richard have you done QA verification?
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
I have, so as long as it hasn't broken since the 15th of last month it looks good.
Status: RESOLVED → VERIFIED
Whiteboard: application complete - accepted → application complete - accepted - qa complete
You need to log in before you can comment on or make changes to this bug.