views:

2319

answers:

7

We are considering switching from Adobe Flex to Silverlight because Flex is just too slow.

I'm interested not in graphical performance, but computational performance and the speed at which it executes code.

Does anyone have any anecdotes to share about their experience of Silverlight performance?

Thanks

A: 

I've found that Silverlight handles the computational performance quite well. I've been disapointed by some of the graphical performance. Since that isn't you problem, I'd suggest some test with a few complex processes. I haven't used Flex, so I don't have a my own test for the difference.

BenMaddox
+2  A: 

Unlike Flex, Silverlight is multi-threaded. Which if used properly gives you the ability to write highly performant apps. There are many articles and blog posts on this. Here's a sample...

http://www.silverlighthack.com/post/2008/09/07/Silverlight-MultiThreading-with-a-Computational-Process-(Counting-Primes).aspx

arch
A: 
  1. Silverlight allows for multi-threading which is great for processing large amounts of data (and as an aside makes the UI seem faster/more responsive to a user)
  2. Silverlight 2 apps written in >Net should run just as fast as .Net apps. There are compiled locally and run "natively" in a managed environment so the performance should be the same as any .Net app which I have found to be pretty darn good or at least programmer-talent-contrained and not toolset-constrained.
  3. My big concern would be that you are running on the client and you will have little ability to know what the speed will be client to client. The min requirements for SL are pretty meager
  4. Also, lots-o-processing typically means lots-o-data so you will want to look into using Isolated Storage (another neat SL feature) and compressing any WCF calls (use IIS7 and turn on dynamic compression)
caryden
+1  A: 

tobinharris posted test results of calculating 1,000,000 primes. Silverlight was the clear victor for performance.

Ryan Riley
+1  A: 

Not sure about how flex does work on the client side.

What I like frokm Silverlight is that a real OOP language (C#) and all is compiled, about computation power, Scott Guthrie published a link to a chess game (same algorithm / implementation approach but javascript vs. silverlight), interesting how SL behave.

In the app I have developed I haven't had any issue on performance (some samples are managing more than 70 tables and relations) working with LINQ to XML... jejej where I have found some samples is fighting against some buggy controls on SL (combo and datagrid).

HTH Braulio

Braulio
+1  A: 

Reading this site and the comments relating to the various posts might help you:

http://www.shinedraw.com/flash-vs-silverlight-gallery/

Reality is Silverlight currently has an inferior rasteriser with some issues (outlined on the site linked above). But, as it has been mentioned here, you do get other benefits that can assist the rendering process such as multi-threading. Recently we ran into a lot of problems with rasterising of input text causing our Flash (for the sake of this conversation Flex is Flash) presentations to hiccup, there is no really good solution for this in Flash at the moment.

I would also suggest you will mostly get web and systems programmers giving their opinions here, rather than computer graphics programmers.

Regards,

Jotham
A: 

To add on to Caryden's answer, Microsoft is working on a multithreading library that makes it very easy to write multithreaded code (Will be part of .Net 4.0). This library will most likely make it into the Silverlight libraries in a future version.

irperez
Silverlight 3 has been confirmed to at least have the "Task" based threading model that ParallelFx / .NET 4 uses.
Richard Szalay