Profiling and Performance Tips for Silverlight –Tim Huer
Timhuer@microsoft.com
There are 2 types of threads: UI Threads, and Non-UI Threads. Use dispatcher object to help manage threads.
For media ther are three good rules to follow:Encode at the minimum you need,Encode at desired size,Blending with Media is expensive.(don’t use opacity over media items)
The two tools that MS provides for profiling Xperf, and Visual Studio. Xperf is a command line tool, that is not accessible from VS, not a complete tool for silverlight profiling. VS tool is recommend, as it will probably get the information we desire. For VS, you need to setup environment to sample from commandline. Need to Add registry to turn off tab processing to test….will need to turn back on.. There are series of command line exe’s that need to run to get profiling. Create a .vsp file that can be opened in VS2010. There is a profiling wizard coming ouit that should help streamline the process.
Some Cheap Diagnosing: Enableframeworkcounter,EnableRedrawRegions, and EnableCacheVisualization. These are only for debugging, do not leave turned on.
Not found does not only mean not found. Highly Recoomend fiddler.
If looking for memory leaks he suggested objectTrack.cs class, found in sliver light community area.
Avoid opacity Animations.
If using transparent use Hexcode instead of Transparent (they arent sure why that is faster, but it is))
SilverlightSPy is a good tool to analyze you silver light app, but its not free.
No comments:
Post a Comment