This is a mirror of official site: http://jasper-net.blogspot.com/

Silverlight Performance Tip

| Thursday, October 21, 2010
After watching Seema’s PDC talk on Building an Optimized, Graphics-Intensive Application in Microsoft Silverlight I thought it would be useful to summarize what I learned.

1. Debugging

The following items will help you debug performance in your Silverlight application:

•EnableRedrawRegions – Turn on this debug setting to see what and where rectangles are being redrawn within your application. When enabled you can see what is painted because the repaint region is colored in blue, yellow or pink. This property is set when you create your Silverlight plug-in.

Example:

<div style="height:100%">
<asp:Silverlight ID="Xaml1" EnableRedrawRegions="true"
EnableFrameRateCounter="true" runat="server" PluginBackground="Transparent"
Windowless="true" Source="~/ClientBin/Snowflakes.xap"
MinimumVersion="2.0.30523" Width="100%" Height="100%" />
</div>

•MaxFrameRate - To see what components of your application are having the most adverse affect on the performance you can set the MaxFrameRate for your application. You can then experiment with adding and removing components to your application to see how the performance changes. To do set the following properties highlighted below:

<div style="height:100%">
<asp:Silverlight ID="Xaml1" MaxFrameRate="10" EnableFrameRateCounter="true"
runat="server" PluginBackground="Transparent" Windowless="true"
Source="~/ClientBin/Snowflakes.xap" MinimumVersion="2.0.30523" Width="100%"
Height="100%" />
</div>

•XPerf – This is a profiling tool that can be used to analyze performance of your Silverlight application. For example, you can track CPU and disk usage over time. Install from here: http://msdn.microsoft.com/en-us/library/cc305187.aspx. For more details and instructions please see this blog

Read more: 110so1

Posted via email from .NET Info

0 comments: