Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Silverlight 5 Beta Rough Notes–Silverlight and IE9 in Windowless Mode


Mike Taulty's Blog



Note: these are early notes based on some initial experiments with the Silverlight 5 beta, apply a pinch of salt to what you read.

If you search the web for something like “Silverlight windowless performance” you’ll find a bunch of articles that talk about how you want to avoid using Silverlight in Windowless mode in the browser for performance reasons.

The main reason why you’d use windowless mode in the first place is when you want to overlay Silverlight content on top of HTML content and, usually, there’s a performance penalty to pay for this because the browser has to take over the rendering and do the work of blending the Silverlight content with the HTML content that might reside “beneath it”.

With Silverlight 5 and IE9 though, that changes as IE9 uses hardware acceleration and Silverlight 5 can plug into that and take advantage of it. As a way of illustrating this, I thought I’d revisit my “whimsical” sample that I did earlier in the year and see how it worked in IE9 with windowless mode.

I altered my sample a little in order that it produces 100 ellipses of random colour and I ran it a few times to check out its performance.


1) Run 1 = Windowed, No GPU Acceleration


the performance here doesn’t look too bad until you realise that the counter is showing 165% cpu utilisation (across my 2 CPUs) so it’s actually a lot worse than it looks!

2) Run 2 = Windowed, GPU Acceleration


Wow, that’s a lot better. I go from 165% down to around 12% with a single flag.

3) Run 3 = Windowless, GPU Acceleration

You can see here the blend of the HTML and the Silverlight content;


and the CPU graph for this monster looks like;


and so we increased things quite a bit but we’re still running around 35% even though we’ve moved to windowless mode.

4) Run 4 = Windowless, GPU Acceleration in Chrome

Here’s Chrome running the same sample where there are 2 proceses involved adding up to around about 80% CPU utilisation – note, I’m not taking cheap shots at Chrome here as IE8, 7, 6 would all exhibit similar behaviour. It’s only IE9 that works magic here;


5) Run 5 = Windowless, GPU Acceleration, FireFox


where there are again 2 processes involved adding up to about 140% CPU utilisation.

So, all in all, this is a positive thing for IE9 and Silverlight 5 which opens up some possibilities around what you might be able to do in a performant manner with windowless mode.

Here’s the example running in the page – if you’re in IE9 this should use a lot less cycles than other browsers so apologies if you’re viewing this and your CPU goes crazy Smile

Posted Tue, Apr 26 2011 2:26 PM by mtaulty
Filed under: , ,


David Salazar wrote re: Silverlight 5 Beta Rough Notes–Silverlight and IE9 in Windowless Mode
on Tue, Apr 26 2011 3:15 PM

Awsome to see that performance and quality are again part of the IE family and keeping up the benchmark with SL5... It seems Chrome and Firefox will have trouble cause with Win8 on the road and WP7 (WP7.5) just ahead Microsoft will regain what is theirs for right... The web would never been what it is today if Microsoft wasn't here... The keep pushing the boundaries, sorry Apple, Mozilla, Google, Linux Foundation... the just "copy/paste" and take the right to claim for it...

Marc Roussel wrote re: Silverlight 5 Beta Rough Notes–Silverlight and IE9 in Windowless Mode
on Tue, Apr 26 2011 5:39 PM

When I come to your blog, it asks me to install a more recent version of Silverlight.  But as a developper I can't do that because I'm afraid that I will not be able to develop in Silverlight 4 because of it.  Is that ok if I install it but continue to do my usual developpement with Silverlight 4 ?

mtaulty wrote re: Silverlight 5 Beta Rough Notes–Silverlight and IE9 in Windowless Mode
on Wed, Apr 27 2011 9:11 AM


I'd say that if you're targeting Silverlight 4 for your work then I wouldn't install beta software and tooling onto the same machine.

It's absolutely supposed to work but that would be my own view.


MSDN UK Team blog wrote Read Mike Taulty’s rough notes on the Silverlight 5 beta
on Fri, May 6 2011 12:19 PM

Wander on over to Mike Taulty’s blog to explore this series of posts detailing Mike’s early rough notes based on initial experiments with the Silverlight 5 beta. Multiple Window Support Markup Extensions Implicit Data Templates Ancestor Relative Binding