Today I got to attend another set of sessions, my focus mostly being on Windows Phone. Jeff Wilcox, the developer of 4th and Mayor (a foursquare client for Windows Phone) and a Software Engineer at Microsoft had a session entirely dedicated to improving performance of Windows Phone applications (mostly related to Silverlight).
He was talking about several problems that were present in the platform. ListBox was one of them - developers are usually complaining about the fact that the scrolling is not very smooth when there are lots of items presents (especially with a custom ItemTemplate). Jeff talked about some hacks (like customizing the ItemPresenter to contain a StackPanel) that would improve the general scrolling experience, but he also mentioned that a lot of effort should be dedicated to formatting the data passed to the ListBox in a proper manner. For example, if images received from a web services are passed for each item instance (that is later bound in the ItemTemplate) are too large, even if those are stretched, the resources allocated for the actual resizing process will have its footprint.
Another issue was the use of the ProgressBar control, that was known for long to have a significant impact on the application performance when used. Instead, Jeff recommends using the new system progress bar (that will be available as a part of the updated tools) since it will run on the system layer and won't be directly tied to the application.
I thoroughly enjoyed the session because most of what Jeff was talking about is not directly tied to any version of the tools, but rather can be applied in pretty much any Silverlight-based Windows Phone application. What was interesting is the fact that Jeff tried to focus on specific examples rather than talk theoretically about possible bottlenecks - he showed less performant samples and fixed them on stage.
You can catch Jeff on Twitter or his blog. If you would like to watch the sessions I am describing in this article, head over here. The recorded session will be available in a couple of days (from today).