web runtime performance

43

Upload: ciaran-caldwell

Post on 02-Jan-2016

67 views

Category:

Documents


1 download

DESCRIPTION

Web Runtime Performance. Tobin Titus Program Manager 3-068. Agenda. Defining Performance Web Runtime Architecture Performance Measurement Tools Walkthroughs / Demos. Performance Exercise. How much do you know about performance?. Travel Site Content. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Web Runtime Performance
Page 2: Web Runtime Performance

Web Runtime Performance

Tobin TitusProgram Manager3-068

Page 3: Web Runtime Performance

Defining PerformanceWeb Runtime ArchitecturePerformance Measurement Tools

Walkthroughs / Demos

Agenda

Page 4: Web Runtime Performance

Performance Exercise

How much do you know about performance?

Page 5: Web Runtime Performance
Page 6: Web Runtime Performance
Page 7: Web Runtime Performance

Anonymized data from each of the travel sites

Travel Site ContentTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 8: Web Runtime Performance

Total size differs by almost a factor of four

Travel Site Content – Total SizeTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 9: Web Runtime Performance

Constructed DOM elements differs by over a factor of four

Travel Site Content – Number ElementsTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 10: Web Runtime Performance

Total CSS rules vary by nearly a factor of five

Travel Site Content – CSS RulesTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 11: Web Runtime Performance

The image files downloaded on the sites vary by a factor of eleven

Travel Site Content – Image FilesTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 12: Web Runtime Performance

Formatted JavaScript lines vary by almost a factor of eight

Travel Site Content – Script LinesTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 13: Web Runtime Performance

Every site uses jQuery at the minimum but sites #1 and #2 are using additional libraries and frameworks as well.

Travel Site Content – Script LibrariesTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 14: Web Runtime Performance

Which site is fastest?

Page 15: Web Runtime Performance

Site #5 is the fastest despite having three times more script lines than sites #3 and #4

Site #5 Is FastestTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 16: Web Runtime Performance

Which site is slowest?

Page 17: Web Runtime Performance

Site #2 is the slowest despite having relatively low number of elements and staying in the middle of the pack on the other metrics.

Site #2 is SlowestTotal

Size (k)

Number Element

s

CSS Rules

Image Files

Script Lines (F)

Script Librarie

s

Site #1 3,697 1,504 1,392 41 77,768

Site #2 2,278 1,100 5,325 29 39,183

Site #3 1,061 2,673 1,105 66 12,643

Site #4 1,812 4,252 1,672 12 10,284

Site #5 1,372 900 3,902 6 38,269

YUIjQuery Prototype ExtJS OtherScriptaculous

Page 18: Web Runtime Performance

Web Performance Factors

What Makes Sites Faster?

Page 19: Web Runtime Performance

Core 1 Core 2

Core 3 Core 4

GPU

Page 20: Web Runtime Performance

Web Runtime Architecture

Page 21: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 22: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 23: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 24: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 25: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 26: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 27: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 28: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 29: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 30: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 31: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 32: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 33: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 34: Web Runtime Performance

Networking Parsers

1

2 7

43 8 9

5 6

DOMTree

Formatting Layout Painting

1

2 7

43 8 9

5 6

Display Tree

Compositing

DOM API&

Capabilities

JavaScript

Touch

Hit Testing

InputCSS Cascade

Page 35: Web Runtime Performance

Event Tracing for Windows (ETW) allows us to see into the web platform architecture

Event Tracing for Windows (ETW)

controller

Provider A

Provider B

Provider C

Trace Files

Session

Buffer

Windows

consumer

ETW

Enable / Disable

Session Control

Page 36: Web Runtime Performance

Windows Performance Toolkit

Windows Performance Toolkit contains an ETW controller (Windows Performance Recorder) and an ETW consumer (Windows Performance Analyzer) that we can use to analyze performance.

Windows Performance Toolkit:http://aka.ms/performance Measuring Browser Performance:http://aka.ms/MeasureBrowserPerf

Page 37: Web Runtime Performance

Exposing Runtime Performance Patterns with Windows Performance Toolkit

Demos

Page 38: Web Runtime Performance

Understanding the web platform architecture is critical to performance

WPT is a powerful measurement tool

Profiling your site can help you identify your sites characteristics

Summary

Page 39: Web Runtime Performance

Related Build Presentations

• 2-066 New IE Developer Tools

• 2-067 New Platform Capabilities for Advancing Web Development

• 3-069 Web Compatibility and Same Markup

• 3-071 Lighting up your site on Windows 8.1

• 4-072 Hyper-fast web graphics with WebGL

• 4-073 Inspecting & Debugging Using IE’s New F12 Developer Tools 

• 3-089: Building media streaming apps and sites without plug-ins using MPEG-DASH

Additional IE Talks

Page 40: Web Runtime Performance

Resources

Overview ConceptsHigh Performance WebsitesSteve Souders, September 2007

Event Faster Websites: Best PracticesSteve Souders, June 2009

JavaScript PatternsHigh Performance JavaScriptNicholas Zakas, March 2010

JavaScript the Good PartsDouglas Crockford, May 2008

JavaScript PatternsStoyan Stefanov, September 2010

JavaScript CookbookShelley Powers, July 2010

Microsoft GuidanceWindows Store App: JavaScript Best Practices MSDN, December 2012

Performance Tricks to Make Apps & Sites FasterJatinder Mann, Build 2012

50 Performance Tricks for Windows Store AppsJason Weber, Build 2011

Engineering Excellence Performance GuidanceJason Weber, EE Forum 2011

Internet Explorer Architectural OverviewJason Weber, PDC 2011

W3C Web PerformanceWeb Performance Working Group HomepagePerformance Timeline SpecificationNavigation Timing Specification

Blog Posts1) Measuring Performance with ETW/XPerf2) Measuring Performance in Lab Environments3) Browser Subsystems Overview4) What Common Benchmarks Measure

ToolsWPT Standalone SDKWindows Performance ToolkitFiddler Web Debugger

Page 42: Web Runtime Performance

Evaluate this session

Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize!

Page 43: Web Runtime Performance

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.