Visual Graphics App Framework / SM Performance

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Visual Graphics App Framework / SM Performance

markus.moenig
Hi,

we are in the process of creating an Open Source, Cross Platform Application Framework which is 100% based on JavaScript and OpenGL / WebGL: www.visualgraphhics.tv.

On the Desktops and Mobile versions we use SpiderMonkey 31.

The framework is usable but in PreAlpha (v0.27).

Now, we have a proof of concept for an node based image effect / filter application running on this Framework: www.ifx-supreme.com.

This app contains 2 simple Image Filters right now.

My question is, on the Web using any modern browser I can run the supplied Preview Image through the Image Node system within 200ms on my system.

However on the Desktop, using SpiderMonkey 31 the same operation takes over 2 seconds. And I am at a loss why the Desktop version is so much slower.

The speed difference has to be related to the typed array accesses of the image data.

Thanks for any thoughts.

Markus
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: Visual Graphics App Framework / SM Performance

Nicolas B. Pierron
Hi Markus,

On 04/29/2015 10:10 AM, [hidden email] wrote:
> My question is, on the Web using any modern browser I can run the supplied Preview Image through the Image Node system within 200ms on my system.
>
> However on the Desktop, using SpiderMonkey 31 the same operation takes over 2 seconds. And I am at a loss why the Desktop version is so much slower.

What do you mean by "using any modern web browser", and what do you mean by
"using SpiderMonkey 31"?  Are you embedding SpiderMonkey, and doing the
WebGL binding your-self, or do you embedded Gecko 31?

I don't know how practical this would be, but we have nultiple mechanism for
profiling.  If you are embedding Gecko, then you might want to enable the
Gecko profiler[1], or the remote Debugger[2], and use Firefox dev-tools to
profile your embedded Gecko.  If you are using SpiderMonkey, we have a
Tracing mechanism[3] which can give you an highly detail profile f the
call-stack.

[1]
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler
[2] https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging
[3]
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Hacking_Tips#Using_the_TraceLogger_%28JS_shell%29

--
Nicolas B. Pierron
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: Visual Graphics App Framework / SM Performance

markus.moenig
Hi Nicolas,

thanks for the answer.

> What do you mean by "using any modern web browser", and what do you mean by
> "using SpiderMonkey 31"?  Are you embedding SpiderMonkey, and doing the
> WebGL binding your-self, or do you embedded Gecko 31?

Sorry for not making this clearer. We have an OpenGL ES 2 abstraction layer, on the Web this is implemented via WebGL in native JS code.

On the Desktops we have an C++ SDL2 based application which implements these classes in C++ and makes them available to the JS subsystem via SpiderMonkey 31. We use SpiderMonkey 31 on Desktops / Mobile.

3D performance is good. Main issue is the general JS performance which is within FireFox much better than in our SM 31 based Desktop implementation. I.e. the image filters run 10 times slower.

I just fear that I setup SM 31 somewhat incorrectly. Will have a look at the tracer.

Thanks

> I don't know how practical this would be, but we have nultiple mechanism for
> profiling.  If you are embedding Gecko, then you might want to enable the
> Gecko profiler[1], or the remote Debugger[2], and use Firefox dev-tools to
> profile your embedded Gecko.  If you are using SpiderMonkey, we have a
> Tracing mechanism[3] which can give you an highly detail profile f the
> call-stack.
>
> [1]
> https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler
> [2] https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging
> [3]
> https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Hacking_Tips#Using_the_TraceLogger_%28JS_shell%29
>
> --
> Nicolas B. Pierron

_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: Visual Graphics App Framework / SM Performance

Boris Zbarsky
On 4/29/15 6:31 AM, [hidden email] wrote:
> I just fear that I setup SM 31 somewhat incorrectly.

Just to check the obvious: After you JS_NewRuntime, do you do something
like this:

JS::RuntimeOptionsRef(rt).setBaseline(true).setIon(true).setAsmJS(true);

?  Because if not, that's your problem right there: a default JSRuntime
does not enable any of the JITs (why??).

-Boris
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: Visual Graphics App Framework / SM Performance

markus.moenig
> Just to check the obvious: After you JS_NewRuntime, do you do something
> like this:
>
> JS::RuntimeOptionsRef(rt).setBaseline(true).setIon(true).setAsmJS(true);
>
> ?  Because if not, that's your problem right there: a default JSRuntime
> does not enable any of the JITs (why??).
>
> -Boris

Thanks Boris! That was it!! Its now blazing fast and we are getting very close to the C++ version of the Image Node system!

Its just really difficult to find stuff like this on the SM Website, non of the example I looked at enabled the JIT.

Thanks again.
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: Visual Graphics App Framework / SM Performance

Boris Zbarsky
On 4/29/15 10:09 AM, Markus wrote:
> Its just really difficult to find stuff like this on the SM Website, non of the example I looked at enabled the JIT.

This is silly.  I filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1160311 to make the default
behavior be "JIT enabled".

-Boris

_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine