Join Seema Ramchandani, Program Manager at Microsoft, as she explores advanced performance profiling techniques in Silverlight 4. From leveraging GPU power to iterative performance measurement, this session covers how to effectively identify performance bottlenecks, monitor frame rates, and optimize animations. Learn to employ tools like VSTS 2010 and XPerf for a comprehensive profiling experience. This session is essential for developers looking to enhance their applications’ performance while ensuring a smooth user experience.
01 / 78Advanced Performance Profiling in Silverlight 4: Techniques and Best Practices
1 / 17
Download Presentation
Advanced Performance Profiling in Silverlight 4: Techniques and Best Practices
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
E N D
More Related Content
Presentation Transcript
CL02 Advanced Performance & Profiling in Silverlight 4 Seema Ramchandani Program Manager Microsoft Corporation
Give me a… • Burly • CT Scan • Churlish • Racquetball • Curling • Brain • Boxing • Double-Click • Espresso Machine • Ribbon • Accordian Control • Adjective • Medical Diagnostic • Adjective • Sport • 2nd Sport • Human Organ • Sport (gerund) • UI Interaction • Household Appliance • UI Element • 2ndUIElement
P09-10 Advanced Performance & Profiling in Silverlight 4 Seema Ramchandani Program Manager Microsoft Corporation
Agenda • Measuring & Profiling • Employing the GPU • Understanding the Layers
Iteratively measure perf 1. Identify potential problem areas • Startup? Memory? Framerate? 2. Monitor as changes are made • Framerate: size of dirty regions 3. Test on a range of hardware 4. Verify that things are as expected
4 Ways to Measure & Profile • Do the changes impact framerate?EnableFrameRateCounter • Visualize the Pain PointsEnableRedrawRegionsEnableCacheVisualization
Screen Updating We only draw what is “dirty”, ….as far as we can figure out, …sometimes we are too sensitive to bindings or property changes. (You should always double-check.)
4 Ways to Measure & Profile • Do the changes impact framerate?EnableFrameRateCounter • Visualize the Pain PointsEnableRedrawRegions • Big Picture: What is the actual diff?Profile: User & Platform CodeVSTS2010 + Silverlight 4 CLR
Profile with VSTS 2010 demo Instructions will be posted on http://blogs.msdn.com/seema vsperfclrenv /sampleon set CORECLR_ENABLE_PROFILING=1 set CORECLR_PROFILER=%COR_PROFILER% vsperfcmd /start:sample /output:myProfile.vsp vsperfcmd /launch:"c:\Program Files\Internet Explorer\iexplore.exe“ navigate, play with app, Shut down. vsperfcmd /shutdown
4 Ways to Measure & Profile • Do the changes impact framerate?EnableFrameRateCounter • Visualize Pain PointsEnableRedrawRegions • Big Picture: What is the actual diff? Profile: User & Platform Code • Profile: Unmanaged Platform CodeVSTS2010 for SL4 or XPerf for SL3
Profiling with XPerf • ETW – Event Tracing for Windows • Tracing mechanism for both user-mode & kernel-mode apps. • Silverlight & CLR have embedded ETW events. • Analyzes unmanaged callstack. • Describes CPU cycles over time • Instructions: • http://blogs.msdn.com/seema
Hardware Acceleration • Plugin Setting EnableGPUAcceleration • UIElement.CacheMode=BitmapCache • API: “Cache” this element as a bitmap. • Behavior: GPU handles Transforms*, Blends, and Clips. • Ex: GPU handles Media shrink or stretch • Support: • Windows: Browser & Fullscreen (all DX9.0c drivers) • Mac: Fullscreen
Where to set BitmapCache? • Animated Properties but Static Content • Transform, Opacity, or Clip • No “SW-only properties” on self or parent • Take care of your visual tree order. • Minimal Interleaving • No Nesting of Cached nodes