Slide 1

Slide 1 text

with Pete Karl II @steyblind July 24, 2013

Slide 2

Slide 2 text

...the amount of useful work accomplished by a computer system compared to the time & resources used.

Slide 3

Slide 3 text

characteristics of performance

Slide 4

Slide 4 text

Metrics Data Targets Revise establish collect make then

Slide 5

Slide 5 text

Bottlenecks on the Web

Slide 6

Slide 6 text

requests

Slide 7

Slide 7 text

bandwidth

Slide 8

Slide 8 text

throughput

Slide 9

Slide 9 text

Under the (browser) hood

Slide 10

Slide 10 text

requests http://jmarshall.com/easy/http/ (extra credit)

Slide 11

Slide 11 text

scripts

Slide 12

Slide 12 text

(re)painting

Slide 13

Slide 13 text

Browser performance (wat do?)

Slide 14

Slide 14 text

Audit for bad practices

Slide 15

Slide 15 text

Identify slow resources

Slide 16

Slide 16 text

JavaScript Performance Profiling

Slide 17

Slide 17 text

Find time-consuming JavaScript

Slide 18

Slide 18 text

Use efficient approaches http://jsperf.com/slow-js-demo (extra credit)

Slide 19

Slide 19 text

Check for memory leaks

Slide 20

Slide 20 text

CSS Performance

Slide 21

Slide 21 text

Look for unnecessary DOM matches

Slide 22

Slide 22 text

Optimize your CSS selectors http://josh.github.io/css-explain/ (extra credit)

Slide 23

Slide 23 text

Avoid excessive repainting

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Resources ★ Google’s Chrome Developer Tools Documentation https://developers.google.com/chrome-developer-tools/ ★ Google’s web performance best practices https://developers.google.com/speed/docs/best-practices/rules_intro ★ 14 Rules for High Performance Web Sites http://stevesouders.com/hpws/rules.php ★ Introduction to HTTP http://jmarshall.com/easy/http/ ★ Pete’s simple JSPerf demo http://jsperf.com/slow-js-demo ★ CSS Explain (webkit selector analysis) http://josh.github.io/css-explain/ ★ Improving the performance of your HTML5 app (applies to any web site) http://www.html5rocks.com/en/tutorials/speed/html5/ ★ MDN Introduction to Memory Management https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management