Skip to main content
October 28, 2010
Windows Phone Developer Blog

PDC Live – Optimizing Performance for Silverlight Windows Phone 7 Applications

PDC is on, and you can watch it online. Right now, I am attending Oren Nachman’s session, Optimizing Performance for Silverlight Windows Phone Applications. Oren is a tester in the Windows Phone team who really hammered the platform searching for nasty bugs, and he did find a few.

While Jaime’s session gave us a high-level look at the architecture underlying Facebook and Tweeter apps, Oren’s session is focused on delivering high performance code and understanding some of the system limitations. If you are not familiar with Silverlight, the session will be somewhat difficult to follow. But if you know Silverlight and you plan on writing a Silverlight Windows Phone application – this is a must-see session for you.

Oren starts by returning to the basics, recapping how Windows Phone Silverlight runtime works in respect to graphics and rendering to the screen. Specifically, Oren reviews the UI and compositor threads, which he uses the Progress Bar to demo. This demo shows what happens if your code ends up being rendered on the UI thread instead of on the compositor thread. It clearly demonstrates that you need to leverage the compositor thread as much as you can and reduce the amount of work done on the UI thread.

Next, Oren presents a series of demos based on an early game prototype called Castaway. Oren exposes a few rendering problems using the same game as along with some of the tools you can use to figure out if you have a rendering problem and what it is.

Next Oren addresses specific Windows Phone control “issues” that you might face with ListBox, specifically with a long ListBox containing a lot of data. He also speaks to problems arising from using complex templates, and loading all the data in advance or during the ListBox loading. At this point you start to recognize the complexity of the platform and the many little things you need to understand and account for in your development efforts.

Oren also explained some work tradeoffs, problems with popups that are not hardware-accelerated, Pano that loads the entire data panel in advance, and more.

I need to stop writing and start listening if I want to keep up with Oren’s tips and tricks…

You could say: Follow Windows Phone announcements on Twitter at WP7DEV

Follow Yochay on Twitter

Get started with free tools and free training

(Post edited by Barbara Alban)