Velocity 2011

Table of Contents

1. Tuesday, June 14th

1.1. 9:00am Performance Tools

Steve Souders (Google), Patrick Meenan (Google), Alois Reitbauer (dynatrace Software), Sergey Chernyshev (truTV)

http://velocityconf.com/velocity2011/public/schedule/detail/19771

1.1.1. WebPageTest

WebPagetest Basic Results Filmstrip Test History Filmstrip Comparison Filmstrip Labels Video Comparison Dynatrace Result tcpdump WebPagetest Presentations Google Booth Presentations

1.1.1.1. Blocking content

Block content…take this back to a management team to illustrate the benefits of applying resources to the effort.

The tradeoffs required are often based around

1.1.1.4. Start downloading a Dynatrace if CPU use is excessive

Can run the debugging offline.

This is an underused feature.

The standard is that Dynatrace should be

1.1.1.5. Capture network packet trace (tcpdump)

If there is a question if something really took that long to load.

1.1.2. Blaze.io

1.1.2.1. Booth will show other agents

Poll a WebPageTest instance for work. Perform the render. Upload the results.

1.1.2.5. UI Web View issues from

Caching being handles

1.2. 11:00am Decisions in the Face of Uncertainty

Just Enough Statistics to be Dangerous John Rauser (Amazon)

Since most people have to work with statistics on an ongoing basis reasonable. Selected this based on the reviews last year b.

1.2.1. Estimation

The goal is only to only include an upper and lower bound. Don't give a single value.

The goal is to be calibrated estimators (i.e., correct 90% of the time).

Want to play a game where for each correct answer

If set too wide there's a spinner game that needs to be played.

Put off giving a single number until as late as possible

1.2.2. Models

  • Look at cache miss rates for a CDN.
  • What is packet drop for a large file.

What is the chance of k success in n success/fail trials where the chance of success for each trial is p?

Look at the consideration associated with games.

Need to provide weighting for the particular nodes.

This is a basic binary tree.

If we're evenly matched and interrupted in the middle of a match where one is ahead to

Pascals triagle: binomial coefficients: select elements in a set by position.

When on the binomial distribution at 90% confidence for the number of heads and tails I should get when flippign a fair quarter.

10,50%,2

http://www.cyclismo.org/tutorial/R/probability.html#binomial

dbinom(x, size, prob, log = FALSE) pbinom(q, size, prob, lower.tail = TRUE, log.p = FALSE) qbinom(p, size, prob, lower.tail = TRUE, log.p = FALSE) rbinom(n, size, prob)

The process one goes through is to calculate the probability.

The smaller the p-value the greater the chance that the null hypothesis isn't correct.

  • Set an expected distribution based on a sample

1.2.3. Inference

Analytical models are approximations are used since simulation was expensive.

http://escholarship.org/uc/item/6hb3k0nz

Based on the examples noted.

rbinom(22,10,0.9) [1] 10 10 10 9 9 9 9 7 8 8 10 9 10 9 8 8 9 8 9 9 9 10

replicate(100,mean(rbinom(22,10,0.9)))

This should use a histogram:

qplot(replicate(100,mean(rbinom(22,10,0.9))))

Stats with Cats…

  • Binomial:
  • Exponential: number
  • Gamma: site latency

1.2.4. Decisions

Find the mean and standard deviation of the normal distribution in our own head.

Find the percentage of space covered up to a standard deviation.

Perform some base anaysis to indicate what the curve actually looks like.

Game: maximize benefits are different than being correct (will all the money in a particular hand).

Install Sage.

http://www.sagemath.org/

  • Create the normal distribution

Solve it with the derivative at 0, for x with a normal distribution .

Still need to have the fundemental elements of math but don't worry about the rest. The value function associated with the probability for a 90% confidence estimate for (an an example) the number of cards in a deck.

http://srmo.sagepub.com/view/the-sage-encyclopedia-of-social-science-research-methods/n637.xml

  • How to Measure Anything
  • The Cartoon Guide to Statistics
  • Introductory Statistics with R
  • Bayesian Data Analysis

1.3. 1:45pm Performance Enhancing Programming with NodeJS Tim Caswell (Creationix)

Connected to a local node instance.

http://172.16.21.13 for the source code

telnet 172.16.21.13 1337

If you just stay in the VM it should be very fast.

Pushed lines http://172.16.21.13:3000/

pcap

http_trace –headers

If you have memory issue occurs then use dtrace to look at the process.

People really aren't using Node for deep server applications. Looks just like a toy language.

http://172.16.21.13:4000/

Continued pushing the ulimit to get more file support.

Breakpoint debugging

Ajax.org Cloud9

Use a Redis server as the state management.

while true; do node server.js; done

The primary audience appears to just be male.

npm is like easy_install.

Works for the install of bench.

Not much audience participation.

node –debug

function createBox = function() { return }

http://code.google.com/p/leveldb/

$ node-waf configure build Checking for program g++ or c++ : usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for program gcc or cc : /usr/bin/gcc Checking for gcc : ok Checking for node path : not found Checking for node prefix : ok /usr/local/Cellar/node/0.4.6 'configure' finished successfully (1.078s) Waf: Entering directory `/Users/tim/Desktop/node-leveldb/build' Waf: Leaving directory `/Users/tim/Desktop/node-leveldb/build' Traceback (most recent call last): File "/usr/local/bin/node-waf", line 16, in <module> Scripting.prepare(t, os.getcwd(), VERSION, wafdir) File "/usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Scripting.py", line 145, in prepare prepare_impl(t, cwd, ver, wafdir) File "usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl main() File "usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Scripting.py", line 188, in main fun(ctx) File "usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Scripting.py", line 386, in build return build_impl(bld) File "usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Scripting.py", line 405, in build_impl bld.compile() File "usr/local/Cellar/node/0.4.6/bin../lib/node/wafadmin/Build.py", line 268, in compile os.chdir(self.bldnode.abspath()) OSError: [Errno 2] No such file or directory: '/Users/tim/Desktop/node-leveldb/build'

Can use the repl: use require then the API being loaded.

Use something like create… for the repl to show the information.

Useful just for the discussion. Allows talking about the system in a reasonable way.

1.4. 3:45pm Mobile Web & HTML5 Performance Optimization

1.4.1. Root causes for mobile web development issues

1.4.1.1. Slower networks
1.4.1.2. Higher latency
1.4.1.3. Slower hardware
1.4.1.6. Different networks

Can be 2-4G

1.4.1.8. Parallel downloads different

1-6 parallel downloads.

1.4.1.10. New HTML5 elements

Some are proxied. This can also cause transformations.

1.4.1.12. No identity
1.4.1.13. No debugging tools

1.4.2. What can't be used

1.4.2.1. Pixels
1.4.2.2. Static
1.4.2.4. Always connected
1.4.2.5. Unlimited power

1.4.3. Must use

1.4.3.5. Top model approach

Start at the top and check all timing and bytes transferred.

1.4.4. Debugging

1.4.4.1. Only two devices with remote debugging
  • Opera Mobile with Dragonfly
  • BlackBerry Browser for PlayBook
1.4.4.3. Use a proxy

These are used with emulators:

  • Charles Proxy
  • Fiddler

pcapperf, weinre, mobileperf…

1.4.4.4. Remote labs

deviceanywhere.com perfectmobile.com remote device access (noia) lab.dev (samsung)

1.4.5. How to test different networks

Use Charles to throttle…

1.4.7. TODO Tasks

This is just the recommendations set from Q2 2011.

1.4.7.4. Don't redirect

See the case where someone goes to http://united.com/ .

1.4.7.8. Only semantic images

No buttons. No images. No ornaments.

1.4.7.11. Icons: Canvas + toDataURL()

This would need to be tested.

Only on the last two version of iPhone.

1.4.7.12. Emoji characters on iOS

Might be an option for http://pukupi.com/post/1964

1.4.7.13. Leave a feature without the nice design

Noone from design was present.

1.4.7.18. Parsing JavaScript takes time

1ms to 100ms per 1kb.

1.4.7.19. Use the W3C Selectors API

This replaces jQuery since $ is available.

1.4.7.20. Application Cache

Set a manifest file. This ensures it's available immediately.

1.4.7.21. Offline storage

Store images in string formats.

Store CSS.

Store html elements.

Code…

This has a 2MB limit.

1.4.7.22. No external CSS, JavaScript

Images used only once should be inlined + gzip.

1.4.7.23. Touch, no click

Click event delays 300ms - 500ms.

Event: ontouchend

1.4.7.24. Ajax

Use server-side if Ajax isn't used in the request for the header elements.

Should be considered mobile friendly.

1.4.7.26. Use HTML > JSON > XML

JSON.parse should be fairly fast.

1.4.7.28. Web Sockets
1.4.7.29. Context and user decision

Need to progressively enhance. Can't assume any device will provide the same

Check the resolutions but make it fast and funtional.

2. Wednesday, June 15th

2.1. 8:30am - 12:00pm Demos and Keynotes

http://velocityconf.com/velocity2011/public/schedule/grid/2011-06-15

Only the Crockford analysis of JS performance is of significant interest.

  • Exhibit hall opens at 9:45
  • t-shirt @ O'Reilly booth at 1:00PM on Wednesday.

2.1.1. Opening Remarks

  • 12:00 t-shirt at 12:00 (1:00) @ O'Reilly booth
  • 6:00 Exhibit hall
  • 7:00 Dyn reception - pool
  • Velocity Passport

2.1.2. Career Development

WebOps - term is two years old.

Hiring is more of a craftsmanship option rather than "expert" status. For most of the actual work that is completed it's based on the actual requirements for a job rather than an abstract expectation

  • Educate yourself
  • Discipline
  • Learn and Share with Peers
  • Patience
  • DevOps is incomplete and requires

How does one acquire the skills or have the time to address all of the requirements unless tooling is available.

What is required to ensure operational software based on the environment?

2.1.3. JavaScript and Metaperformance

Can't determine degredation in the browser given the DOM: web developers may not even use the tools for inspection into the running state focusing on layout and IO.

Example: web developers will pick the approach where the trivial information about the performance (e.g., forEach, for, for in) without looking at the actual performance. Results from benchmarks for engine performance then driving the selection of programming techniques.

Causes:

  • JS Engine developers need to optimize the engines against some metric.
  • Web developers need to add in performance early or no time to add later.

Benchmarks don't reflect how programs actually work. There are patterns to how to write JavaScript well.

Challenge to Chrome to look at how JSLint was running in practice.

2.1.4. Look at Your Data

Time series charts of shallow data.

  • Starry Night
  • Moby Dick

20ms buckets breakdown from average data.

2.1.5. Testing and Monitoring Mobile Apps

Product demo (Mobile Device Perspective) for testing native Android and iOS test. Includes scripting interface, test construction, and monitoring.

Uses a built-in JavaScript engine.

API looks very minimal:

  • Tap
  • Swipe
  • ClickKey
  • StartTimer
  • EndTimer

Timers just work like the event-based timers on page loads.

2.2. 1:00pm CSS3 & HTML5 - Beyond the Hype!

Nicole Sullivan (Stubbornella Consulting Group)

http://velocityconf.com/velocity2011/public/schedule/detail/18244

2.2.1. CSS3 is finally ready

Now can stand as a viable option.

2.2.2. Performance vs. Design

How do you perform the trade-offs between features needed in MSIE6 and more featured browsers? How do you ensure that something is still a feature.

  • No features but fast
  • Remove commenting
  • > in the breadcrumbs
  • Gradients
  • Rounded cornders
  • Drop shadows
  • Full featured but slow

Will your audience really check against the rendering in all browsers? That's a developer or implementation

2.2.3. Provide a different user experience based on browsers

But who should specify the functionality.

2.2.4. Selectors can degrade rapidly

Don't want to be too close to the edge of the degradation curve.

2.2.5. Things to review

  • Selectors
    • Match from right to left
    • Attribute selectors are slow
    • Just match on class not element.class
    • Transparency
    • Animation + border-raidius, gradient
    • Combining elements makes them slower, requires testing
  • CSS3 best features
    • Replace images with CSS
    • rgba(r,g,b,o)
    • border-http

http://www.opera.com/docs/specs/presto211/css/selectortests/

2.2.6. CSS Lint

http://csslint.net

CSS linter and parser in JavaScript.

[~=foo] throws a warning.

Missing default selector for vendor prefixed throws a warning.

$ npm -g install csslint

2.3. 1:50pm Writing Fast Client-Side Code: Lessons Learned from SproutCore

Yehuda Katz (Strobe, Inc.)

2.3.3. JS is cheaper than DOM

querySelector all may not be all faster than something like Sizzle.

2.3.4. Events can't coalesce; need to use flagging

If you want to combine events or if the user is performing a series of actions that don't have to be processed or completed immediately.

If this thing has happened then do this thing.

2.3.5. Materialize objects when used

Big data; when you get back data you don't immediately render.

Would also want to proxy something that looks like.

new Person({name: 'jason', age: 100, foo: 'bar'});

For some reasonable number of items you may want to download but not display.

2.3.6. Follow speed guidelines

JS is reactive and callback oriented. When this data changes then perform this action. Forces the application to immediately react to the event.

You often don't need to perform DOM changes as you get a user event.

Don't want to continue parsing the Model and then performing the action immediately. This mirrors the way that the browsers actually work with the data.

2.3.7. Example

var jason = new Person(); jason.setName = 'jason'; jason.setTitle = 'developer'; jason.setAddress = {street: '1234 main', state: 'WA'}

This emulates the transactional model used in databases.

jason.commit() ?

2.3.8. SproutCore Implementation

Creates a secondary event loop. Hooks on to the end of the primary browser event loop.

native event -> {handle event, handle event} -> sync bindings

Enforces coordination between items.

2.3.9. Keep the intermediate state in JavaScript not DOM

Don't try to have loops performed if only based on a single user interaction.

2.3.10. Prefer Coalescing Operations

If you use an event based system you don't have any other way to do anything other than to set .

Create a boolean value to indicate if something is dirty.

ArrayController.

Run loop is set as a short setTimeout

2.3.11. SproutCore: use a data object for instantiation

This is the same as config, options,

Compare Facebook and

2.3.12. SproutCore 2.0

These were largely mobile applications that drove the new features.

2.3.12.2. Dependencies
2.3.12.3. Lazy load module

2.4. 2:40pm Oh, To Be Single Again - Building a Single Codebase in a Client-server World

Daniel Hunt (Yahoo!)

2.4.1. What it means to have a combined codebase

Create JavaScript on the serverside.

2.4.2. History

As of 2005 there was a significant amount of content.

2.4.5. Templating: Use Mustache

Yahoo uses Mustache.

2.4.6. Wdiget/Module/Plugin

  • Instantiate: var myWidget = newWdiget
  • Render
    1. Loading event and UI (RenderEvent = {parent: '', content: ''})
    2. getData (JSON)
    3. Complete event RenderEvent = {parent: '#mydiv', content: '<b>my content</b>'}

2.4.7. Revised structure for widgets with MVC

Controller.js: command.js, DOM.js Model.js: store.js, fetch.js View.js: render.js

2.4.8. Exploring Yahoo! Mail

type=mail.UI.MesageList

2.5. 4:55pm WebPagetest Update

Patrick Meenan (Google) Ballroom EFGH

2.6. 4:05pm Know Your Engines: How to Make Your JavaScript Fast

David Mandelin (Mozilla Corporation)

  • Minimize the number of shapes provided during the implementation.
  • Write type-stable SJ,

2.6.1. History

2.6.1.1. 2006

Front-end -> AST/bytecode

Object have different shapes based on properties and prototypes.

Lots of boxing and unboxing of values with storage independent of the base execution.

2.6.1.2. 2011

Front-end (Interpreter, JIT Compiler, Type-Specializing JIT Compiler)

Breaks down items into fast and slow zones. Fast provided for common operations like string concat, adding numbers, but not string + undefined.

2.6.2. Object Properties

IC: inline caching.

As properties are accessed the IC

  • global varial
  • direct property
  • closure variable

Nested prototypes don't harm performance since the ICs cache the shape.

function A() { this.x = 'x' } function B() { this.x = 'y' } function C() { this.x = 'z' }

B.prototype = A;

2.6.3. Deeply nested closures are slow

var f = function() { var x; var g = function() { var h = function() { …

2.6.4. Slow

2.6.4.2. DOM Access

DOM access for empty is slow.

2.6.4.3. Scripted getters

2.6.5. Type Specializing JIT

Tracemonkey (Firefox) Crankshaft (Chrome)

IonMonkey is an expected updated.

2.6.5.4. Optimize only hot code

Tracemonkey: > 70 iterations Cranshaft: profiler specific

2.6.6. Garbase Collection

What requires later cleanup:

  • Objects
  • Arrays
  • Strings
  • Function objects

GC pauses execution. The essential algorithm:

  • Traverse all actionalble elements
  • If no other points
  • Nursey (frequently called), scavenging
  • Tenured (long lived), mark-and-sweep

2.6.7. Performance Faults

2.6.7.1. Strings

In the slow zone.

  • .substring is fast (dont need to copy)
  • concat is find
2.6.7.2. Arrays

Dense good. Sparse bad.

2.6.7.3. Iterations

reduce, forEach, reduce can be slow.

2.6.7.4. Arguments
2.6.7.5. Creating objects

Generally slow.

Constructors are fast.

2.6.7.6. OOP Styling

Using is the same.

  1. Prototype

    This is fast and fully optimized.

  2. Information Hiding (slow)
  3. Instance Methods (slow)
2.6.7.7. Exceptions

Slow. Thow/catch is slow.

2.6.7.8. eval and with

Both violate strict.

2.6.8. Top 5

2.6.8.1. Avoid eval
2.6.8.2. No object in hot loops

Generates GC work

2.6.8.3. Use desne arrays

Know what causes sparse arrays.

2.7. 4:55pm WebPageTest updates

2.7.1. Above the fold

4 minutes of recorded time but should be limited on the public instance. Limited to Dallas.

2.7.2. dynaTrace

2.7.3. Packet trace

2.7.4. Page Replay

Location in Dallas will record then measure against a recording. No backend varience.

Latency down to 0: the fastest a p

2.7.5. Blaze Mobitest

Deeper integration.

2.7.6. ShowSlow integration

Not public now. Would send trending information.

2.7.7. Private instances

2.7.7.1. Bulk testing

This also includes an aggregated results page.

2.7.7.3. Public projects

HTTP Archive.

2.7.8. REST API

Private is likely the best.

2.7.9. WPT Monitor

Watches trended information over time. Much like Gomez.

2.7.10. Standardized API

In progress.

2.8. 5:20pm Web Site Acceleration with Page Speed Technologies

Joshua Marantz (Google), Pradnya Karbhari (Google), Michael Schneider (Google)

http://code.google.com/speed/page-speed/docs/rules_intro.html

2.8.1. Modern vs. older

2.8.1.1. 2008

IE6, IE7.

2.8.1.2. 2011

Script tags will be fetched in parallel. should reduce the need to reduce loader scripts. for core page you should just use in the

If dependencies are based on user interaction then use a loader.

Modern browsers are much better.

2.8.2. Combine external resources

Older browsers would serialized the requests. Round-trip by request.

Parallel resource downloads are faster. This needs to be done with real content to determine.

The factors:

  • Modern or older browser
  • Fragmented (200)
  • Client bandwidth (number of packets)
  • Initial congestion size window

Combining still makes sense for mobile. You need to test the correct approach. All of the trade-offs and measure the constraints.

If user has a lot of bandwidth the rules will change.

2.8.3. Sharded domains

Parallel connections across hostnames: this was a sharding approach.

2.8.4. JavaScript loading of JavaScript

Likely unnecessary

2.8.5. Doubleclick reduced 1 redirect and decreased

12% increase in click-through

RT @souders: DoubleClick removed 1 client side redirect & cut 1.5 second in ad load time and increased CTR by 12% on mobile. Bryan McQuade #VelocityConf

2.8.7. Mobile RTT

2 - 3 seconds idle time if device is slow for 10s

if channel is active then the RTT is 40ms

2.8.8. Touch vs. Click = 300ms overhead saved

appspot.com for the

2.8.9. Reommendations: use Application Cache

high initial rtt

2.8.10. Reflows

Tony jetsburg width, height, are reflows.

This is added as a new rule.

2.9. 5:45pm mod_pagespeed

Need to understand the tradeoffs in the way that pages are built.

Inline images, browser support, build process, changing WPO recommendations.

3. Thursday, June 16th

3.1. 8:30am - 12:00pm Demos and Keynotes

3.1.1. SSDs

  • Go buy SSDs. Right Now! via @crucially #velocityconf
  • I need an SSD in my life. Thanks Artur! #velocityconf
  • "JOINs are fast. Fuck nosql" - @crucially making known his love of SSDs at #velocityconf. Use SSDs and "stop wasting your life".
  • "If you don't have an SSD in your laptop, you are wasting your life." -@crucially Amen. #velocityconf

3.1.3. Page Speed

New Page Speed Chrome beta! Detects extra reflows, excess network serialization, and long-running scripts. http://t.co/DsKZ2Sq

3.2. 11:00am Browsers - Chrome

Mike Belshe (Google)

3.2.1. Networking

vs. CPU, rendering, JS.

See the HTTP Archive data.

3.2.1.2. WebP
3.2.1.3. TCP

Packet loss on the initial connnection. Spikes at 3, 9, 21.

3.2.1.4. Make SSL faster

-1 RT out of the initial handshake.

3.2.1.5. MObile

High RTT; SPDY alternative to HTTP.

Amazon: those guys know what they're doing and they optimize pretty well.

3.2.2. Gaming

3.2.2.1. 3d CSS

3.2.4. TODO Chrome Developer Tools

Speed Tracer: stack trace on a layout.

3.4. 1:50am Instrumenting the real-time web

Wha Brian Cantrill's talk and view on the Robinson projection is quite hilarious #velocityconf

Bryan Cantrill just went from node.js and DTrace to flying into a rage over the Mercator projection. Hysterical. #velocityconf

http://www.slideshare.net/bcantrill/instrumenting-the-realtime-web

3.4.1. Base ideas

  • Async (closures)
  • High Performance VM (V8)
  • Systems abstractions (UNIX)

3.4.2. Node Knockout

The leaderboard.

3.4.3. Using dtrace

dtrace -n io:::start

3.4.5. Implementing the leaderboard

3.4.5.1. libdtrace add-on for tickerd
  • bcantrill/node-libdtrace
3.4.5.2. leaderd
3.4.5.3. git statistics was hardest part

github.com/silentrob/

3.4.5.4. Analytics

http://rm.no.de:8001/

Agent Count Macintosh; Intel Mac OS X 10_6_7 20 Windows NT 6.1; WOW64 4 Macintosh; U; Intel Mac OS X 10_6_7; en-us 2 Macintosh; Intel Mac OS X 10.6; rv:2.0 2 iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us 2 X11; U; Linux i686; en-US; rv:1.9.2.3 1 X11; SunOS i86pc 1 Windows NT 6.1; rv:2.0.1 1 Macintosh; Intel Mac OS X 10_7 1 Windows NT 6.1; WOW64; rv:2.0.1 1 Macintosh; U; Intel Mac OS X 10_6_7; en-US 1 iPad; U; CPU OS 4_3_3 like Mac OS X; en-us 1 Macintosh; Intel Mac OS X 10.6; rv:2.0.1 1 Macintosh; Intel Mac OS X 10_6_6 1 Macintosh; Intel Mac OS X 10.5; rv:2.0.1 1 Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17 1 Macintosh; Intel Mac OS X 10.5; rv:5.0 1

3.6. 4:05pm Metrics-driven Engineering at Etsy

Kellan Elliott-McCrea (Etsy)

Metrics-driven Engineering at ETSY with @kellan up next #velocityconf

3.6.1. Why talk about metrics

Rates of failure across servers. Logging, correlations, etc.

3.6.6. access_logs

All of the log information about the user is pushed into the Apache logs. None of this is standard.

3.6.7. statsd

NodeJS application. OCaml binding. Available in github.

3.6.8. logsterd

3.6.10. Determine alerting

Holt Winters Aberration

3.6.11. 48 dashboards by 32 engineers

Made it easy to create and track.

3.6.12. Low MTTD but don't stop failures

Fall into the trap and start hiring QA engineers.

3.6.13. Log collection

3.6.14. QA Engineers

"If you don't know how you're doing you fall into fear and start hiring QA engineers & it's all downhill from there." @kellan #velocityconf

3.6.15. Working with Splunk can be painful

Web Fail Report links back to UAID.

Developers weren't excited to work with Splunk. Seemed to like Ganglia and Graphite.

3.6.16. Deployment

The code is monolythic. Doesn't include search or schema changes.

3.8. 5:20pm The Impact of Ads on Performance and Improving Perceived Performance

Julia Lee (Yahoo!, Inc.)

3.8.1. Definitions

3.8.1.2. Ad creative

All assest

3.8.1.3. Ad decition time
3.8.1.4. Ad serving time
3.8.1.5. Ad rendering time

Aggregation of all factors in showing the ad.

No good metrics.

3.8.2. Timeline

Know the main measurements.

Mapped all of the rollouts to the measured times.

3.8.4. Ad defensive streategis

3.8.4.1. Ad handling library
  • Ad content is in iframe
  • Iframe is cross-domain url
  • API that publishers and vendors can use
  • Uses cross-domain messaging
3.8.4.2. Double buffering
  • Use ad handling library to hook into events
  • Perform the same position to have a page view to work with.
  • Load the first ad into the iframe
  • Load the second ad into the iframe under the first iframe.
  • Whean the second ad is loaded the first iframe on top

loadAd('postion1')

3.8.4.3. Fine grained ad loading
  • Sever vs. client
  • Combine ad requests with ap[plication requests
  • Delay ad loading to avoid browser contention
3.8.4.4. Users will wait until the spinner stops

This is the deficiency.

3.8.4.5. Web2.0 Ad Flow

Gets the ads as data to wait for the ad to be loaded as data.

3.8.4.6. Example: Mail read flow

Push it after the message processing.

Use the onload event in the iframe to determine when to rolled the buffered ad back into the frame.

3.8.5. Impact on users

No known impact, only a small user base.

3.8.6. Scenarios

3.8.6.1. Double buffering
3.8.6.3. Check if the load even happened

This addresses the

3.8.8. Working with ad vendors was essentially boiling the ocean

What do we want to have ads do for security.

4. Summary

4.1. Goal:

Consolidate the tools and analysis indicated at other conferences into a cohesive unit.

4.2. Overview:

The audience was a mixture of standard technical business and operations (the guys in t-shirts or rumpled short-sleeve shirts, shorts, and Tevas)

Even the best people for mobile (the Blaze.io guy) doesn't have precise information on the caching policies of the mobile web browser operating systems. The best source of data appears to be coming from Dion.

Much of the work centers on bringing the tools together. This might be the critical time for automation with the release of the source for ShowSlow and the PageSpeed API.

The initial goal should be to get Dynatrace for all JavaScript developers. This needs to be supported for smaller projects to confirm how the tool work.

Core goal was to establish that we need to continue to learn and that even base mathematics likely aren't followed by active practitioners.

The actual history shows the chaos of the languages, tools, professionalism, etc. of the web.

4.3. Problem:

  • Any non-trivial app is difficult to review as a completed entity
  • Monitoring performance has only recently been possible
  • No obvious internal owner exists for performance
  • Limited resources to both perform review and complete
  • When issues seen no prioritization against feature development
  • Any page test is hard to tell what is happening
  • If resources are spent on monitoring is should be spent on tooling
  • If issues are triaged are there resources to addressed
  • When should performance issues be killed

4.4. Solution:

Need to begin with a general, high-level, set of numbers that indicate trending. However, most of these aren't entirely accurate or appropriate but only designed to indicate the scope of an actual review of site performance.

4.5. Example:

On an new, individual feature basis it's possible to run reasonable performance tests since profiling is reasonable and the amount of running JavaScript and the rendering limits are known to a single person.

4.6. Resources:

  • Mobile developers
  • Front-end engineers
  • Performance engineer

5. Tasks

5.2. Why a web page isn't the same as mobile

5.2.2. click vs. touch

RT @andraz: Google's Engineers: there's a 300ms lag between mouse over the link and a click. We can start loading 300ms earlier! #velocityconf [smart++]

5.4. Need build tools

Get dependency management, concatenation.

5.7. Interal WebPageTest

This should be allowed to have teams perform the review.

Traditionally the organization doesn't recognize that the site has changed but the cause isn't obvious. This provides a weekly walkthrough of the specifics of the results.

5.9. Write expanded code so the JavaScript artifacts can be selectively removed from download queue

If you have a series of required files structure a development instance

view.php?id=110606_9762c3d6591ae6177bf54f7b195569f1442dd811

5.10. Internal ShowSlow setup

Set up the beacon and run WebPageTest automatically.

This replicates the approach used for having an external server.

5.12. Consider a weekly performance review team for 6m

This would just use the YSlow metrics on a weekly basis and just walk through the specific page implementations.

What is the benefit to the organization by having a triage team or a weekly review of the actual breakdown in pages?

This would require that Operations and Front-end review the outcomes weekly to see what the structural changes are needed. Can't just be a single person report.

5.17. Training Session: Performance monitoring, analysis, and deep dive

This also shows the ordering of the functionality.

Show all of the aggregated activities review.

This would need to be done during the development.

5.18. TODO WebDev Triage: Any front-facing action for the site (features, FlexPub, ads)

This isn't a specific problem that would need to be addressed but rather just a weekly triage of all of the performance issues on the site.

Triage also includes features under development. Intended to simplify the analysis of mobile web development.

Broadly include any resource but only pull in people that have issues that are opened. If issues are found when would they be closed out? What would the organizational value be?

5.20. Workflow for performance review

5.20.4. Review Chef

Joshua Timberman (Opscode, Inc.), Adam Jacob (Opscode), Christopher Brown (Opscode), Aaron Peterson (Opscode, Inc.), Matt Ray (Opscode), Seth Chisamore (Opscode, Inc.)

http://www.opscode.com/chef/

5.20.5. Push Seattle Speed

This mirrors

  • Boston Web Performance Group

http://www.meetup.com/Web-Performance-Boston/

  • New York Web Performance Group

http://www.nywebperformance.org/

  • San Francisco & Silicon Valley Web Performance Group

http://www.meetup.com/SF-Web-Performance-Group/

  • London Web Performance Meetup
  • Paris
  • LA Speed

Could be done through the Seattle JS group.

Emphasize the tools used beyond just the debugger.

  • Case 1: Your own project
  • Case 2: Review something not your own

Tools are the emphasis.

5.21. Statistics

Binomial Distribution binomdist(3,4,5)

5.23. Install node-bench

This is an isasacs project.

5.26. Internal resource allocation

Developers, unless independently focussed on mobile web won't have time to build tools in addition to feature development.

5.26.1. Client Tech

Primary feature development team.

5.26.2. Checkout

5.26.3. FlexPub

5.26.4. WOPR

5.27. Internal projects to get people up to speed

Doing development with best practices will require that people practice before the actual development. In order to work with teams internally these would need to be done with other people to ensure some approaches are standardized.

In particular, some HTML5 features wouldn't be supported, but static designs will indicate that features should be hacked in. Without correct tools (including debuggers, proxies, emulators, or physical devices) any individual couldn't successfully complete a project.

5.30. Additional cost for removing jQuery-specific features for Selectors API

Even using libraries there's significant risk to adding lots of dynamic features.

5.34. Server can reply with everything inline + cookie

Only provide the basic HTML and JavaScript.

This is used by Bing and Google.

5.39. Perform a sumamry of the types of object construction and APIs

This should be done with a local install of a code review tool.

5.39.1. Knockout

Many cases of the namespace.item = new (function () { return { functions… })…

5.39.2. EloquentJS

5.41. Push a script loader

This is for performance.

5.43. Changes to the Recommended performance approach

Changes to account for modern browsers also considering mobile.

  • Parallized domains (not done)

5.45. Test offline support for mobile app

http://www.html5rocks.com/en/tutorials/appcache/beginner/

Allows a freshness test from a single request.

People still aren't using large chunks of the newer features.

5.47. Web + Mobile Performance Tools

5.47.1. Chrome

5.47.2. Firebug

5.47.3. Safari

5.48. Console updates in Firebug and Chrome

console.timeStamp()