1 / 22

Visual Studio diagnostics tools for XAML-based Windows Store apps

Visual Studio diagnostics tools for XAML-based Windows Store apps. Pratap Lakshman Senior Program Manager 3-322. Agenda. Performance is a feature. Pillars of performance. Diagnosis with Visual Studio. Summary. Great performance motivates app purchases.

adele
Télécharger la présentation

Visual Studio diagnostics tools for XAML-based Windows Store apps

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

Presentation Transcript


  1. Visual Studio diagnostics tools for XAML-based Windows Store apps PratapLakshman Senior Program Manager 3-322

  2. Agenda • Performance is a feature. • Pillars of performance. • Diagnosis with Visual Studio. • Summary.

  3. Great performance motivates app purchases • User implicitly relates consistent performance with app quality. Source: http://www.businessnewsdaily.com/

  4. Pillars of performance • Fast, fluid & efficient, are the dimensions of performance the app user perceives. • Fast. • “Snappy” user interaction. • Relation: app launch, navigating pages. • Fluid. • “Smooth” user interaction. • Relation: scrolling, panning, animation. • Efficient. • System “citizenship”. • Relation: battery life, memory usage.

  5. …and their tooling in Visual Studio • Post mortem profile data analysis. • Supports remote profiling. • “Performance and diagnostics hub” serves as the single entry point for the profilers. • XAML UI responsiveness. • Relation: fast, fluid. • CPU sampling. • Relation: fast, fluid. • Same as the experience shipped in Visual Studio 2012. • Energy consumption. • Relation: efficient. • Managed memory dump analysis. • Relation: efficient. • Designed for production diagnostics scenarios.

  6. Fast, fluid—influence of XAML, app code • The pipeline. • XAML operations broken down into frames. • UI thread and composition thread can submit frames. • Load/parse/build element tree/object model. • Formatting (styles)/layout. • Compute formats, apply templates. • Measure and arrange. • Build visual tree for hit-testing and rasterization. • Render visible objects into primitives. • Display/rasterization. • Walk visual tree, rasterize to target surfaces. • Composition. • Independent animations, walk visual tree, to render to primary and present.

  7. Fast, fluid—influence of XAML, app code • Reduce complexity! • Update screen content in ‘vsync’ cadence (16.7ms). • App code execution can happenduring frame preparation time. • Parsing. • Files parsed (time to parse, number of times parsed, number of elements). • Load on the UI thread. • Templates (multiplied). • Content virtualization. • Complex layout. • Dependent animations. • Load on the composition thread. • Independent animations. • Overdraw. • App code (specifically, per frame callbacks).

  8. Demo: XAML UI responsiveness tool

  9. Fast—analysis

  10. Fast—analysis

  11. Demo: CPU sampling tool

  12. Efficient—influence of system resource usage • CPU, network, display are the resources that tend to dominate energy consumption. • Very difficult to attribute energy usage to every resource accurately enough to make it actionable. • Too many variables. That is not we are trying to do here. • Empirically, CPU, display, network resources dominate. • The tool discovers energy hungry segments of an app scenario. • …without imposing the use of power metering hardware. • …by mapping resource usage to estimated energy using a software power model. • Optimize the resource usage to make the apps more energy efficient.

  13. Efficient—influence of CPU, display, network • Reduce CPU usage. • Animations are not free. White/Bright pixel more expensive on OLED. • “Network” provides hidden optimization opportunities. • Look out for managed memory leaks. • CPU power state transitions as load varies. • Display power varies by. • HW implementation (smart vs. dumb LCD vs. OLED). • User settings (brightness). • Design choices (color content, animations). • Network. • Wired ≠ Wireless. • Wi-Fi ≠ 2G, 3G, 4G(power management by Radio Resource Controller). • Memory consumption.

  14. Efficient—influence of the Network RRC • Sample RRC state machine. • RRC intended to support stable, scalable performance, and be battery-aware.

  15. Efficient—influence of the Network RRC • Every data transfer will cycle the radio to high power, and reset the timeouts.

  16. Demo: energy consumption tool

  17. Demo: managed memory dump analysis

  18. Summary • Need to consider performance “holistically”. • Performance is a feature. Need to balance it across multiple dimensions. • Fast, fluid & efficient are the pillars spanning the dimensions of time, energy & space. • Need to manage influence of XAML, app code & system resources. • Performance and Diagnostics Hub. • Single point of entry for the performance tools. • Post-mortem analysis. • Supports remote profiling. • End to end lifecycle tooling. • Design-time to production.

  19. Resources • Related sessions. • WCL-157: XAML Performance Fundamentals. • WCL-158: Dramatically increase performance when users interact with large amounts of data in GridView and ListView. • WCL-164: What’s new in XAML. • Dev-12: developing high performance websites and modern apps with JavaScript performance tools. • Dev-16: diagnosing issues in JavaScript Windows Store Apps with Visual Studio. • Performance documentation. • http://aka.ms/fastxaml • Thank you!

  20. Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session • Scan this QR codeto evaluate this session and be automatically entered in a drawing to win a prize!

More Related