Silverlight Feeds - All your Silverlight feeds in one place.

Sponsors

Tuesday, November 09, 2010

Windows Phone 7 Development Tip: Use Concurrent Programming Techniques

by bartczernicki.nospam@nospam.gmail.com (Bart Czernicki) via Silverlight Hack on 11/9/2010 6:33:00 PM

Windows Phone 7 devices are out in the wild; now we can finally test if those emulator performance enhancements truly work.  There is A LOT of misinformation out there about the hardware of the Windows Phone 7 devices.  You can see that the Windows Phone 7 hardware utilizes the 1st generation SnapDragonprocessor which includes a single CPU.  However, the single physical CPU is able to effectively manage multiple threads concurrently.

Today I had a chance to deploy a Windows Phone 7 sample from my book to a physical Windows Phone 7 device and I was pleasantly surprised that the multithreading performance in the emulator is reflected on the physical phone device.  The sample I wrote was a simple slider that is tied to a fake activity of 150ms of CPU "work".  On the physical device the second slider (shown below) completely locks up the entire device and the application becomes unusable.  The third slider is very responsive, because it uses a secondary thread to manage the work.

 

I included the source code here.  If you are interested in how this optimization works, refer to Chapter 10 (Concurrent Programming) and Chapter 12 (Mobile Intelligence) of my book.  I have blogged numerous times about concurrent programming in Silverlight herehere and here.  Even in my current book, I devoted an entire chapter to concurrent programming in Silverlight 4 including an example for the Windows Phone 7.  Since Windows Phone 7 apps run Silverlight 3 (plus a little Silverlight 4 with some threading changes) all these multithreading techniques I have written about (in my book and online) will apply.

email it!bookmark it!digg it!

Original Post: Windows Phone 7 Development Tip: Use Concurrent Programming Techniques

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us