Anderson Quach (Microsoft) Tony Gentilcore (Google)

18
Working together to create Web Performance Standards Anderson Quach (Microsoft) Tony Gentilcore (Google)

Transcript of Anderson Quach (Microsoft) Tony Gentilcore (Google)

Page 1: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Working together to create Web Performance Standards

Anderson Quach (Microsoft)Tony Gentilcore (Google)

Page 2: Anderson Quach (Microsoft) Tony Gentilcore (Google)

We’ll answerWhat is the Web Performance Working

Group?

Why is real-world measurement challenging?

What works today?

What’s next?

Working Group: http://www.w3.org/2010/webperf/

Page 3: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Measuring real-world performance

Page 4: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Measuring performance todayStandard way to measure latency across

browsersNo way to measure network latency from

JavaScriptServer-side measures lack complete picture

Page 5: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Resources from HTML : Resource Timing

Web standards to measure performanceHTML

document : Navigation Timing

Interactive scenarios : User Timing

hyperlink

Page 6: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Challenges with providing performance informationKeeping end-users safe w.r.t. privacy and

securityEfficient implementation in the browserUseful information to assess and diagnose

performance issues

Page 7: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Navigation Timing

Page 8: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Navigation Timingwindow.performancenavigation – describes the type of

browsing and browsing activitytiming – the time taken to fetch and load

the HTML documentwindow.performance.timing;

Specification: http://test.w3.org/webperf/specs/NavigationTiming/

Page 9: Anderson Quach (Microsoft) Tony Gentilcore (Google)

What’s next?

Page 10: Anderson Quach (Microsoft) Tony Gentilcore (Google)

The Navigation Timing “gap”

Page 11: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Resource Timing: filling in the gapDetailed timing for resources used by the page

redirectStart/EndfetchStartdomainLookupStart/EndconnectStart/EndrequestStart/EndresponseStart/EndloadEventStart/End

Identify slow loading resources of any typeXHR, CSS, CSS Images, <script>, <img>, <object>,<frame>, <iframe>, <embed>, <audio>, <video>

Specification: http://test.w3.org/webperf/specs/ResourceTiming/

Page 12: Anderson Quach (Microsoft) Tony Gentilcore (Google)

After the load

Page 13: Anderson Quach (Microsoft) Tony Gentilcore (Google)

User Timing: timing interactive apps

Simple interface to high-precision timing

mark(“open_email”);

Standard location for analytics scripts and dev tools

getMarks();> { open_email: 1299128230553 }

Specification: http://test.w3.org/webperf/specs/UserTiming/

Page 14: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Measure painting: a stretch goalGive web apps better insight into when

content appears on the screen

Allow web apps to determine frame rate for animations

Work within security and performance constraints

Page 15: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Spare the CPU

Page 16: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Visibility, Yielding, Painting Allow web app to know if it is in the

background so it can be more efficientPoll less frequentlyPause animationsStop updates

Allow true zero-duration yields

Avoid animating faster than paints can keep up

Page 17: Anderson Quach (Microsoft) Tony Gentilcore (Google)

Q & Amailto: [email protected]

Page 18: Anderson Quach (Microsoft) Tony Gentilcore (Google)

ResourcesDownload and try it out

Latest version of Microsoft IE9 www.microsoft.com/ie9 Latest Google Chrome Beta

http://www.google.com/landing/chrome/beta/ Demos

http://ie.microsoft.com/testdrive/Performance/msPerformance/Default.html

http://webtimingdemo.appspot.com/ W3C resources

Working Group http://www.w3.org/2010/webperf/ Navigation Timing

http://test.w3.org/webperf/specs/NavigationTiming/ Resource Timing

http://test.w3.org/webperf/specs/ResourceTiming/ User Timing http://test.w3.org/webperf/specs/UserTiming/