We’re looking at developing a Windows 8 Metro-style app which will be very photo-heavy, so we’re concerned about UI performance. On iOS it was an easy decision (Objective-C over HTML to get the UI performance we needed), but researching Windows 8 I’m having a harder time telling how much faster XAML will be than HTML5/CSS.
I’ve seen general comparisons between XAML and HTML5 (like this one), and there’s an SO answer that touches on performance, but provides no data to back up his claim or explain why XAML is faster.
From what I’ve read, HTML5/CSS is rendered using IE10’s rendering engine, meaning it isn’t super-native and may be slower. But I’m not sure how the XAML is rendered, or just how “native” it is.
Has anyone done performance comparisons between the two technologies, or can you provide links to further explanation about how each is rendered (with performance in mind)?
Here are my thoughts on this one:
First XAML can give you a better performance than HTML5.
If you use XAML combined with C++ you’ll get the best performance for WinRT, because C++ is native code. If you use C# instead you depend on the CLR (Common Language Runtime) which is slower then native code.
– Reference 1
– Reference 2
Second, if you are going to include a lot of JavaScript libraries, which you probably will, it will have an impact on performance. (jQuery, jqQuery plugins, backbone.js, …)
Then, like you said, the HTML5 in JS is rendered using IE’s engine. So this is a tricky one. It really depends on how you are going to write your code.
For best practices for both XAML and JS you can look here.
From personal experience. I wrote an app using XAML/C#. It feels better then Windows Phone 7 and 7.5. Mainly because they trimmed down .NET. The new
asyncandawaitmodel is pretty good to. You can easily implement asynchronous calls, to webservice or image rendering in your case.But I’m also interested in the numbers, so if anyone done a test, that would be great.