开发者

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 m开发者_JAVA技巧e 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!


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


My guess would be that Silverlight 3 is utilizing Hardware Acceleration.

Moonlight 2 isn't.


Per jstedfast's response, I've confirmed that in Moonlight 4 preview (3.99.0.3), there seems to be an issue with screen validation/hardware acceleration. Simply assigning a tool tip to the main screen slows the interface to the point that it's unusable in Moonlight but works fine in Silverlight under the same hardware. However, non-graphical operations have comparable execution times.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜