Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moonlight 2 vs Silverlight 3: huge performance gap

I have tried the simple test "Silverlight 2.0 animation test" at http://bubblemark.com, surprisingly Moonlight provided only 26 fps on Linux. Windows/Silverlight 3 gave me 192 fps on the exact same machine. Why is Moonlight so much slower than Silverlight?

This performance gap is really important if you are planning to develop high fps, multi platform apps in Silverlight, since the current speed of Moonlight can be a limiting factor.

Please don't answer if the only things you have to say are trivialities like "moonlight is a reimplementation, it must be slower", or "it lags behind the official version".

I am interested in some kind of an authourative answer, especially from someone familiar with the code and current state of Moonlight.

Thanks!

like image 628
monofan Avatar asked Jan 27 '10 20:01

monofan


1 Answers

There have been a few optimization tweaks that went in after the 2.0 release which should improve things a little. The general answer, though, is that Moonlight currently doesn't take advantage of hardware acceleration as much as Silverlight on Windows does.

Part of this is that the graphics drivers on Linux aren't optimized for the particular code-paths used by Cairo, the low-level graphics library used by Moonlight.

However, excuses aside, we've brought over David Reveman (the famous XGL/Compiz creator) to work with us on optimizing Moonlight as well as implementing the Silverlight 3.0 shader effects for us. He'll be looking into having Moonlight take advantage of OpenGL for faster rendering.

I think we've also got some bugs to work out that cause a larger area of the screen to be invalidated (and thus redrawn) than what is absolutely necessary. This is another area that causes major slowdowns in rendering.

Hope that answers your question. If you have more questions, feel free to ask us on IRC in #moonlight on irc.gnome.org

like image 111
jstedfast Avatar answered Nov 03 '22 02:11

jstedfast