Moonlight 2 vs Silverlight 3: huge performance gap
Asked Answered
O

3

9

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!

Olds answered 27/1, 2010 at 20:40 Comment(3)
Was your comparison based on native (non-virtualized) hardware?Dragonhead
Yes. Dual booting to Windows Xp and Ubuntu 9.10 with the latest proprietary graphics drivers on both systems.Olds
I suspect Justin is correct it will be a Hardware Acceleration thing, however since you are looking for an "authoratative" answer you should perhaps consider asking on the moonlight forum here:- go-mono.com/forums thats where the developers of moonlight will be hanging out.Chape
D
20

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

Defiant answered 27/1, 2010 at 23:39 Comment(1)
You sir are my hero, I have never expected to get such a great answer :)Olds
S
4

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

Moonlight 2 isn't.

Scuppernong answered 27/1, 2010 at 20:43 Comment(0)
V
1

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.

Volauvent answered 4/8, 2011 at 21:12 Comment(1)
Can confirm - Moonlight 3.99 is still unusable in FullScreen mode watching video (e.g. news.sky.com) - Time to ditch Linux completely...?Pga

© 2022 - 2024 — McMap. All rights reserved.