SlideShare a Scribd company logo
1 of 65
Download to read offline
Performance
 Improvements in
    Browsers
                  John Resig
http://ejohn.org/ - http://twitter.com/jeresig/
About Me
    Work for the Mozilla Corporation (Firefox!)
āœ¦
    āœ¦ Do a lot of JavaScript performance analysis
    āœ¦ Dromaeo.com is my performance test suite
      āœ¦ Tests the performance of JavaScript engines
      āœ¦ Tests the performance of browser DOM

    Creator of the jQuery JavaScript Library
āœ¦
    āœ¦ http://jquery.com/
    āœ¦ Used by Microsoft, Google, Adobe, Nokia,
      IBM, Intel, CBS News, NBC, etc.
Upcoming Browsers
    The browsers:
āœ¦
    āœ¦ Firefox 3.1
    āœ¦ Safari 4
    āœ¦ Internet Explorer 8
    āœ¦ Opera 10
    āœ¦ Google Chrome

    Deļ¬ning characteristics:
āœ¦
    āœ¦ Better performance
    āœ¦ Advanced JavaScript engines
Firefox 3.1
    Set to be released Spring 2009
āœ¦

    Goals:
āœ¦
    āœ¦ Performance improvements
    āœ¦ Video and Audio tags
    āœ¦ Private browsing

    Beta 2 just released
āœ¦

    http://developer.mozilla.org/En/Firefox_3.1_for_developers
āœ¦
Safari 4
    Released in conjunction with OS X 10.6
āœ¦

    Features:
āœ¦
    āœ¦ Performance improvements
    āœ¦ Desktop Apps
    āœ¦ ACID 3 compliance
    āœ¦ Revamped dev tools

    Preview seeded to developers
āœ¦

    http://webkit.org/blog/
āœ¦
Internet Explorer 8
    Released early 2009
āœ¦

    Features:
āœ¦
    āœ¦ Backwards compatibility with IE 7
    āœ¦ Web Clips (trim out a part of a page and
      place on desktop)
    āœ¦ Process per tab

    RC1 recently
āœ¦
    released
    http://www.microsoft.com/
āœ¦
    windows/internet-explorer/
    beta/readiness/new-features.aspx
Opera 10
    Unspeciļ¬ed release schedule (2009?)
āœ¦

    Features:
āœ¦
    āœ¦ ACID 3 compliance
    āœ¦ Video and Audio tags

    Opera 9.6 recently released
āœ¦

    http://labs.opera.com/
āœ¦
Google Chrome
    Chrome 1.0 September 2008
āœ¦

    Features:
āœ¦
    āœ¦ Private browsing
    āœ¦ Process per tab

    Chrome 2.0 upcoming
āœ¦

    http://googlechromereleases.blogspot.com/
āœ¦
Process Per Tab
    Most browsers have a single process
āœ¦
    āœ¦ Share memory, resources
    āœ¦ Pages rendered using threads

    IE 8 and Chrome split tabs into individual
āœ¦
    processes
    What does this change?
āœ¦
    āœ¦ Pages can do more processing
      āœ¦ (Not block the UI or other tabs)
    āœ¦ Tabs consume more memory
Process Per Tab
    Examples of changes, in Chrome.
āœ¦

    Timer speed is what you set it to.
āœ¦
    āœ¦ Browsers cap the speed to 10ms.
    āœ¦ setInterval(fn, 1);

    Can do more non-stop processing, without
āœ¦
    warning:
    while (true) {}
    Chrome has a process manager (like the
āœ¦
    OS process manager - see CPU, Memory)
JavaScript Engines
    New wave of engines:
āœ¦
    āœ¦ Firefox: TraceMonkey
    āœ¦ Safari: SquirrelFish (Extreme)
    āœ¦ Chrome: V8

    Continually leap-frogging each other
āœ¦
Common Areas
    Virtual Machines
āœ¦
    āœ¦ Optimized to run a JavaScript-speciļ¬c
      bytecode
    Shaping
āœ¦
    āœ¦ Determine if two objects are similar
    āœ¦ Optimize behavior based upon that
    āœ¦ ā€œWalks like a duck, quacks like a duckā€
    āœ¦ if ( obj.walks && obj.quacks ) {}
Engine Layers

          JavaScript Code


       JavaScript Engine (C++)


                                  Virtual
             Bytecode
                                 Machine


           Machine Code
Bytecode
    Speciļ¬c low-level commands
āœ¦

    Written in machine code
āœ¦

    a + b;
āœ¦

    PLUS( a, b ) {
āœ¦
      IF ISSTRING(a) OR ISSTRING(b) {
        return CONCAT( a, b );
      } ELSE {
        return ADD( a, b );
      }
    }
Shaping
    Simple JavaScript code:
āœ¦
    obj.method()
    GETPROP( obj, name ) {
āœ¦
      IF ISOBJECT(obj) {
        IF HASPROP(obj, name)
         return PROP(obj, name);
        ELSE
         return PROTO(obj, name)
      } ELSE {
        ERROR
      }
    }
Shaping (cont.)
    EXEC( prop ) {
āœ¦
      IF ISFN( prop ) {
        RUN( prop )
      } ELSE {
        ERROR
      }
    }
    After shaping:
āœ¦
    RUN( PROP( obj, name ) )
    Optimized Bytecode
āœ¦
TraceMonkey
    Firefox uses an engine called
āœ¦
    SpiderMonkey (written in C)
    Tracing technology layered on for Firefox
āœ¦
    3.1 (dubbed ā€˜TraceMonkeyā€™)
    Hyper-optimizes repeating patterns into
āœ¦
    bytecode
    http://ejohn.org/blog/tracemonkey/
āœ¦
Tracing
    for ( var i = 0; i < 1000; i++ ) {
āœ¦
      var foo = stuļ¬€[i][0];
      foo = ā€œmore stuļ¬€ ā€ + someFn( foo );
    }
    function someFn( foo ) {
      return foo.substr(1);
    }
    Loop is costly
āœ¦
    āœ¦ ISNUM(i)
    āœ¦ ADD(i, 1)
    āœ¦ COMPARE( i, 1000 )
Function Inlining
    for ( var i = 0; i < 1000; i++ ) {
āœ¦
      var foo = stuļ¬€[i][0];
      foo = ā€œmore stuļ¬€ ā€ + foo.substr(1);
    }
SquirrelFish
    Just-in-time compilation for JavaScript
āœ¦

    Compiles a bytecode for common
āœ¦
    functionality
    Specialties:
āœ¦
    āœ¦ Bytecodes for regular expressions (super-
      fast)
    http://arstechnica.com/journals/linux.ars/2008/10/07/extreme-
āœ¦
    javascript-performance
Chrome V8
    Makes extensive use of shaping (fast
āœ¦
    property lookups)
    Hyper-optimized function calls and
āœ¦
    recursion
    Dynamic machine code generation
āœ¦

    http://code.google.com/p/v8/
āœ¦
Measuring Speed
    SunSpider
āœ¦
    āœ¦ Released by the WebKit team last fall
    āœ¦ Focuses completely on JavaScript

    Dromaeo
āœ¦
    āœ¦ Released by Mozilla this spring
    āœ¦ Mix of JavaScript and DOM

    V8 Benchmark
āœ¦
    āœ¦ Released by Chrome team last month
    āœ¦ Lots of recursion testing

    Quality: http://ejohn.org/blog/javascript-benchmark-quality/
āœ¦
http://ejohn.org/blog/javascript-performance-rundown/
http://ejohn.org/blog/javascript-performance-rundown/
http://ejohn.org/blog/javascript-performance-rundown/
Network
Network
    Steve Soudersā€™ UA tool:
āœ¦
    http://stevesouders.com/ua/
    Also see: YSlow
āœ¦
Simultaneous Conn.
    Number of downloads per domain
āœ¦

    Should be at least 4
āœ¦
    āœ¦ FF 2, IE 6, and IE 7 are 2
    āœ¦ Safari is 4
    āœ¦ Everyone else is 6-7

    Max connections: Number of simultaneous
āœ¦
    downloads
    āœ¦ Firefox, Opera: 25-30
    āœ¦ Everyone else: 50-60
Parallel Scripts
    Download scripts simultaneously
āœ¦

    Even though they must execute in order
āœ¦

    <script defer>
āœ¦
    āœ¦ From Internet Explorer
    āœ¦ Just landed for Firefox 3.1
    āœ¦ In Opera as well
    āœ¦ Replacement for JavaScript-based
      loading
Redirect Caching
    A simple request:
āœ¦
    http://foo.com ->
    http://www.foo.com ->
    http://www.foo.com/
    Very costly, should be cached.
āœ¦

    Chrome and Firefox do well here.
āœ¦
Link Prefetching
    <link rel=ā€prefetchā€ href=ā€someimg.pngā€/>
āœ¦

    Pre-load resources for later use
āœ¦
    āœ¦ (images, stylesheets)

    Currently only in Firefox
āœ¦

    Replacement for JavaScript preloading
āœ¦
Communication
postMessage
    A way to pass messages amongst multiple
āœ¦
    frames and windows
    Implemented in all browsers (in some
āœ¦
    capacity).
    Sending a message:
āœ¦

    iframe.postMessage(ā€œtestā€,
āœ¦
      ā€œhttp://google.com/ā€);
postMessage
    Receiving a Message:
āœ¦

    window.addEventListener(ā€messageā€, function(e){
āœ¦
      if (e.origin !== ā€œhttp://example.com:8080ā€œ)
        return;
      alert( e.data );
    }, false);
Cross-Domain XHR
    Landed in Firefox 3.1, support in IE 8
āœ¦

    Add a header to your content:
āœ¦
    Access-Control-Allow-Origin: *
    XMLHttpRequest can now pull it in, even
āœ¦
    across domains
    https://developer.mozilla.org/En/
āœ¦
    HTTP_Access_Control
DOM Navigation
Class Name
    New method:
āœ¦
    getElementsByClassName
    Works just like:
āœ¦
    getElementsByTagName
    Fast way of ļ¬nding elements by their class
āœ¦
    name(s):
    <div class=ā€person sidebarā€></div>
    document.getElementsByClassName(ā€œsidebarā€)
āœ¦


    Safari 3.1, Firefox 3.0, Opera 9.6
āœ¦

    Drop-in replacement for existing queries
āœ¦
Speed Results




http://ejohn.org/blog/getelementsbyclassname-speed-comparison/
Selectors API
    querySelectorAll
āœ¦

    Use CSS selectors to ļ¬nd DOM elements
āœ¦

    document.querySelectorAll(ā€œdiv pā€)
āœ¦

    Good cross-browser support
āœ¦
    āœ¦ IE 8, Safari 4, FF 3, Opera 10

    Drop-in replacement for JavaScript
āœ¦
    libraries.
Speed Results




http://www2.webkit.org/perf/slickspeed/
Traversal API
    W3C Speciļ¬cation
āœ¦

    Implemented in Firefox 3.1
āœ¦

    Some methods:
āœ¦
    āœ¦ .nextElementSibling
    āœ¦ .previousElementSibling
    āœ¦ .ļ¬rstElementChild
    āœ¦ .lastElementChild

    Related:
āœ¦
    āœ¦ .children (All browsers)
Drag and Drop
HTML 5 Dragging
    Includes full support drag and drop events
āœ¦

    Events: dragstart, dragend, dragenter,
āœ¦
    dragleave, dragover, drag, drop
    <div draggable=ā€trueā€
āœ¦
    ondragstart=ā€event.dataTransfer.setData
    (ā€™text/plainā€™, ā€˜This text may be draggedā€™)ā€>
      This text <strong>may</strong> be
    dragged.
    </div>
    Only in Firefox 3.1
āœ¦
Bounding
    getBoundingClientRect
āœ¦
    āœ¦ Introduced by IE
    āœ¦ Seeing a wider introduction

    Super-fast way to determine the position
āœ¦
    of an element
    Better alternative to manual computation
āœ¦
JavaScript Threads
    JavaScript has always been single-threaded
āœ¦

    Limited to working linearly
āœ¦

    New HTML 5 Web Workers
āœ¦

    Spawn JavaScript threads
āœ¦

    Run complicated work in the background
āœ¦
    āœ¦ Doesnā€™t block the browser!

    Drop-in usable, huge quality boost.
āœ¦
A Simple Worker
    var myWorker = new Worker(ā€™my_worker.jsā€™);Ā Ā 
āœ¦
    myWorker.onmessage = function(event)Ā {Ā Ā 
      alert(ā€Called back by the worker!nā€);Ā Ā 
    };Ā Ā 
Styling and Eļ¬€ects
    Lots of commons styling eļ¬€ects
āœ¦

    Can be replaced and simpliļ¬ed by the
āœ¦
    browser
    Drastically simplify pages and improve
āœ¦
    their performance
Rounded Corners
    CSS 3 speciļ¬cation
āœ¦




    Implemented in Safari, Firefox, Opera
āœ¦
    āœ¦ -moz-border-radius: 5px;
    āœ¦ -webkit-border-radius: 5px;

    Can replace clumsy, slow, old methods.
āœ¦
Shadows
    Box Shadows
āœ¦
    āœ¦ Shadow behind a div
        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5)
    āœ¦


    Text Shadows
āœ¦
    āœ¦ Shadow behind some text
        text-shadow: -1px -1px #666, 1px 1px #FFF;
    āœ¦

    Implemented in WebKit, Firefox
āœ¦

    Can replace clumsy, slow, old methods.
āœ¦
Example Shadows




    Demos: http://maettig.com/code/css/text-
āœ¦
    shadow.html
    http://webkit.org/blog/86/box-shadow/
Custom Fonts
    Load in custom fonts
āœ¦

    Can load TrueType fonts
āœ¦

    Implemented in Safari and Firefox
āœ¦

    Demo: http://ejohn.org/apps/fontface/
āœ¦
    blok.html
    Can replace using Flash-based fonts.
āœ¦
Transforms and Animations
    Transforms allow you to rotate, scale, and
āœ¦
    oļ¬€set an element
    āœ¦ -webkit-transform: rotate(30deg);

    Animations allow you to morph an
āœ¦
    element using nothing but CSS
    āœ¦ -webkit-transition: all 1s ease-in-out;

    Implemented in WebKit and Firefox
āœ¦

    Demo: http://www.the-art-of-web.com/css/
āœ¦
    css-animation/
    Can replace JS animations, today.
āœ¦
Canvas
    Proposed and ļ¬rst implemented by Apple
āœ¦
    in WebKit
    A 2d drawing layer
āœ¦
    āœ¦ With possibilities for future expansion

    Embedded in web pages (looks and
āœ¦
    behaves like an img element)
    Works in all browsers (IE with ExCanvas)
āœ¦

    Oļ¬„oad rendering to client
āœ¦

    Better user interaction
āœ¦
Shapes and Paths
    NOT vectors (unlike SVG)
āœ¦

    Rectangles
āœ¦

    Arcs
āœ¦

    Lines
āœ¦

    Curves
āœ¦




    Charts:
āœ¦
Fill and Stroke
    All can be styled (similar to CSS)
āœ¦

    Stroke styles the path (or outline)
āœ¦

    Fill is the color of the interior
āœ¦

    Sparklines:
āœ¦
Canvas Embedding
    Canvases can consume:
āœ¦
    āœ¦ Images
    āœ¦ Other Canvases

    Will be able to consume (Firefox 3.1, Safari
āœ¦
    4):
    āœ¦ Video

    In an extension:
āœ¦
    āœ¦ Web Pages
Data
SQL Storage
    Part of HTML 5 - a full client-side SQL
āœ¦
    database (SQLite)
    Implemented in WebKit
āœ¦

    var database = openDatabase(ā€dbā€, ā€œ1.0ā€);
āœ¦
    database.executeSql(ā€SELECT * FROM testā€, function(result1) {
       // do something with the results
       database.executeSql(ā€DROP TABLE testā€);
    });
Native JSON
    JSON is a format for transferring data
āœ¦
    āœ¦ (Uses JavaScript syntax to achieve this.)
    āœ¦ Has been slow and a little hacky.

    Browser now have native support in
āœ¦
    Firefox 3.1 and IE 8
    Drop-in usable, today
āœ¦
    āœ¦ JSON.encode(object)
    āœ¦ JSON.decode(string)
Performance
    Encoding:
āœ¦




    Decoding:
āœ¦
New Measurements
Painting
    When something is physically drawn to
āœ¦
    the screen
    Hard to quantify without more
āœ¦
    information
    Firefox 3.1 includes a new event:
āœ¦
    MozAfterPaint
    Demo: http://ejohn.org/blog/browser-
āœ¦
    paint-events/
Paint Events
Reļ¬‚ow
    CSS has lots of boxes in it
āœ¦

    Position of boxes is constantly recomputed
āœ¦
    and repositioned (before being painted)
    āœ¦ This is reļ¬‚ow

    Demo: http://dougt.wordpress.com/
āœ¦
    2008/05/24/what-is-a-reļ¬‚ow/
Questions?
    John Resig
āœ¦
    http://ejohn.org/
    http://twitter.com/jeresig/

More Related Content

What's hot

Ajax Security
Ajax SecurityAjax Security
Ajax SecurityJoe Walker
Ā 
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015Jeongkyu Shin
Ā 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010Nicholas Zakas
Ā 
Socket applications
Socket applicationsSocket applications
Socket applicationsJoĆ£o Moura
Ā 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
Ā 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsMatthew Beale
Ā 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
Ā 
SocketStream
SocketStreamSocketStream
SocketStreamPaul Jensen
Ā 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocketDamien Krotkine
Ā 
Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBen Limmer
Ā 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
Ā 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
Ā 
How we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaHow we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaCosimo Streppone
Ā 
Ugo Cei Presentation
Ugo Cei PresentationUgo Cei Presentation
Ugo Cei PresentationRubyOnRails_dude
Ā 
Thomas Fuchs Presentation
Thomas Fuchs PresentationThomas Fuchs Presentation
Thomas Fuchs PresentationRubyOnRails_dude
Ā 
Advanced AV Foundation (CocoaConf, Aug '11)
Advanced AV Foundation (CocoaConf, Aug '11)Advanced AV Foundation (CocoaConf, Aug '11)
Advanced AV Foundation (CocoaConf, Aug '11)Chris Adamson
Ā 
Transients are good for you - WordCamp London 2016
Transients are good for you - WordCamp London 2016Transients are good for you - WordCamp London 2016
Transients are good for you - WordCamp London 2016Boiteaweb
Ā 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010Nicholas Zakas
Ā 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gearsdion
Ā 

What's hot (20)

Ajax Security
Ajax SecurityAjax Security
Ajax Security
Ā 
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015
ģ—°źµ¬ģž ė° źµģœ”ģžė„¼ ģœ„ķ•œ ź³„ģ‚° ė° ė¶„ģ„ ķ”Œėž«ķ¼ ģ„¤ź³„ - PyCon KR 2015
Ā 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010
Ā 
Socket applications
Socket applicationsSocket applications
Socket applications
Ā 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
Ā 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
Ā 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web Standards
Ā 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Ā 
SocketStream
SocketStreamSocketStream
SocketStream
Ā 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
Ā 
Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSockets
Ā 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
Ā 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Ā 
How we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaHow we use and deploy Varnish at Opera
How we use and deploy Varnish at Opera
Ā 
Ugo Cei Presentation
Ugo Cei PresentationUgo Cei Presentation
Ugo Cei Presentation
Ā 
Thomas Fuchs Presentation
Thomas Fuchs PresentationThomas Fuchs Presentation
Thomas Fuchs Presentation
Ā 
Advanced AV Foundation (CocoaConf, Aug '11)
Advanced AV Foundation (CocoaConf, Aug '11)Advanced AV Foundation (CocoaConf, Aug '11)
Advanced AV Foundation (CocoaConf, Aug '11)
Ā 
Transients are good for you - WordCamp London 2016
Transients are good for you - WordCamp London 2016Transients are good for you - WordCamp London 2016
Transients are good for you - WordCamp London 2016
Ā 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
Ā 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
Ā 

Viewers also liked

Performance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptPerformance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptjeresig
Ā 
Ajax Performance
Ajax PerformanceAjax Performance
Ajax Performancekaven yan
Ā 
Douglas Crockford - Programming Style and Your Brain
Douglas Crockford - Programming Style and Your BrainDouglas Crockford - Programming Style and Your Brain
Douglas Crockford - Programming Style and Your BrainWeb Directions
Ā 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Domkaven yan
Ā 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Sagakaven yan
Ā 
10 tips to get started with html5 games
10 tips to get started with html5 games10 tips to get started with html5 games
10 tips to get started with html5 gamesGregory Kukolj
Ā 
Douglas Crockford - Ajax Security
Douglas Crockford - Ajax SecurityDouglas Crockford - Ajax Security
Douglas Crockford - Ajax SecurityWeb Directions
Ā 
OOP in JavaScript
OOP in JavaScriptOOP in JavaScript
OOP in JavaScriptmanugoel2003
Ā 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockfordrajivmordani
Ā 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptAdieu
Ā 
Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript ConceptsNaresh Kumar
Ā 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureNicholas Zakas
Ā 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Languageguestceb98b
Ā 
Speed Up Your JavaScript
Speed Up Your JavaScriptSpeed Up Your JavaScript
Speed Up Your JavaScriptNicholas Zakas
Ā 

Viewers also liked (15)

Performance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptPerformance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScript
Ā 
Ajax Performance
Ajax PerformanceAjax Performance
Ajax Performance
Ā 
Douglas Crockford - Programming Style and Your Brain
Douglas Crockford - Programming Style and Your BrainDouglas Crockford - Programming Style and Your Brain
Douglas Crockford - Programming Style and Your Brain
Ā 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Dom
Ā 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Saga
Ā 
10 tips to get started with html5 games
10 tips to get started with html5 games10 tips to get started with html5 games
10 tips to get started with html5 games
Ā 
Douglas Crockford - Ajax Security
Douglas Crockford - Ajax SecurityDouglas Crockford - Ajax Security
Douglas Crockford - Ajax Security
Ā 
Json
JsonJson
Json
Ā 
OOP in JavaScript
OOP in JavaScriptOOP in JavaScript
OOP in JavaScript
Ā 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockford
Ā 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
Ā 
Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript Concepts
Ā 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application Architecture
Ā 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
Ā 
Speed Up Your JavaScript
Speed Up Your JavaScriptSpeed Up Your JavaScript
Speed Up Your JavaScript
Ā 

Similar to John Resig on performance improvements in upcoming browsers

Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsersjeresig
Ā 
The Future of Firefox and JavaScript
The Future of Firefox and JavaScriptThe Future of Firefox and JavaScript
The Future of Firefox and JavaScriptjeresig
Ā 
jQuery 1.3 and jQuery UI
jQuery 1.3 and jQuery UIjQuery 1.3 and jQuery UI
jQuery 1.3 and jQuery UIjeresig
Ā 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MITjeresig
Ā 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)jeresig
Ā 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
Ā 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
Ā 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
Ā 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Yearssneeu
Ā 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesSimon Willison
Ā 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
Ā 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelmoscon2007
Ā 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareCosimo Streppone
Ā 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
Ā 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
Ā 
JavaFX Advanced
JavaFX AdvancedJavaFX Advanced
JavaFX AdvancedPaul Bakker
Ā 
Intro to go web assembly
Intro to go web assemblyIntro to go web assembly
Intro to go web assemblyChe-Chia Chang
Ā 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSocketsGonzalo Ayuso
Ā 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Enginecatherinewall
Ā 

Similar to John Resig on performance improvements in upcoming browsers (20)

Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
Ā 
The Future of Firefox and JavaScript
The Future of Firefox and JavaScriptThe Future of Firefox and JavaScript
The Future of Firefox and JavaScript
Ā 
jQuery 1.3 and jQuery UI
jQuery 1.3 and jQuery UIjQuery 1.3 and jQuery UI
jQuery 1.3 and jQuery UI
Ā 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MIT
Ā 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)
Ā 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
Ā 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
Ā 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
Ā 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Years
Ā 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Ā 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
Ā 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
Ā 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
Ā 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
Ā 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
Ā 
JavaFX Advanced
JavaFX AdvancedJavaFX Advanced
JavaFX Advanced
Ā 
How Akamai Made ESI Testing Simpler
How Akamai Made ESI Testing SimplerHow Akamai Made ESI Testing Simpler
How Akamai Made ESI Testing Simpler
Ā 
Intro to go web assembly
Intro to go web assemblyIntro to go web assembly
Intro to go web assembly
Ā 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
Ā 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
Ā 

More from jeresig

Does Coding Every Day Matter?
Does Coding Every Day Matter?Does Coding Every Day Matter?
Does Coding Every Day Matter?jeresig
Ā 
Accidentally Becoming a Digital Librarian
Accidentally Becoming a Digital LibrarianAccidentally Becoming a Digital Librarian
Accidentally Becoming a Digital Librarianjeresig
Ā 
2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)jeresig
Ā 
Computer Vision as Art Historical Investigation
Computer Vision as Art Historical InvestigationComputer Vision as Art Historical Investigation
Computer Vision as Art Historical Investigationjeresig
Ā 
Hacking Art History
Hacking Art HistoryHacking Art History
Hacking Art Historyjeresig
Ā 
Using JS to teach JS at Khan Academy
Using JS to teach JS at Khan AcademyUsing JS to teach JS at Khan Academy
Using JS to teach JS at Khan Academyjeresig
Ā 
Applying Computer Vision to Art History
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art Historyjeresig
Ā 
NYARC 2014: Frick/Zeri Results
NYARC 2014: Frick/Zeri ResultsNYARC 2014: Frick/Zeri Results
NYARC 2014: Frick/Zeri Resultsjeresig
Ā 
EmpireJS: Hacking Art with Node js and Image Analysis
EmpireJS: Hacking Art with Node js and Image AnalysisEmpireJS: Hacking Art with Node js and Image Analysis
EmpireJS: Hacking Art with Node js and Image Analysisjeresig
Ā 
Applying Computer Vision to Art History
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art Historyjeresig
Ā 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
Ā 
Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)jeresig
Ā 
jQuery Recommendations to the W3C (2011)
jQuery Recommendations to the W3C (2011)jQuery Recommendations to the W3C (2011)
jQuery Recommendations to the W3C (2011)jeresig
Ā 
jQuery Open Source Process (RIT 2011)
jQuery Open Source Process (RIT 2011)jQuery Open Source Process (RIT 2011)
jQuery Open Source Process (RIT 2011)jeresig
Ā 
jQuery Open Source Process (Knight Foundation 2011)
jQuery Open Source Process (Knight Foundation 2011)jQuery Open Source Process (Knight Foundation 2011)
jQuery Open Source Process (Knight Foundation 2011)jeresig
Ā 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobilejeresig
Ā 
jQuery Open Source (Fronteer 2011)
jQuery Open Source (Fronteer 2011)jQuery Open Source (Fronteer 2011)
jQuery Open Source (Fronteer 2011)jeresig
Ā 
Holistic JavaScript Performance
Holistic JavaScript PerformanceHolistic JavaScript Performance
Holistic JavaScript Performancejeresig
Ā 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)jeresig
Ā 
Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)jeresig
Ā 

More from jeresig (20)

Does Coding Every Day Matter?
Does Coding Every Day Matter?Does Coding Every Day Matter?
Does Coding Every Day Matter?
Ā 
Accidentally Becoming a Digital Librarian
Accidentally Becoming a Digital LibrarianAccidentally Becoming a Digital Librarian
Accidentally Becoming a Digital Librarian
Ā 
2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)
Ā 
Computer Vision as Art Historical Investigation
Computer Vision as Art Historical InvestigationComputer Vision as Art Historical Investigation
Computer Vision as Art Historical Investigation
Ā 
Hacking Art History
Hacking Art HistoryHacking Art History
Hacking Art History
Ā 
Using JS to teach JS at Khan Academy
Using JS to teach JS at Khan AcademyUsing JS to teach JS at Khan Academy
Using JS to teach JS at Khan Academy
Ā 
Applying Computer Vision to Art History
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art History
Ā 
NYARC 2014: Frick/Zeri Results
NYARC 2014: Frick/Zeri ResultsNYARC 2014: Frick/Zeri Results
NYARC 2014: Frick/Zeri Results
Ā 
EmpireJS: Hacking Art with Node js and Image Analysis
EmpireJS: Hacking Art with Node js and Image AnalysisEmpireJS: Hacking Art with Node js and Image Analysis
EmpireJS: Hacking Art with Node js and Image Analysis
Ā 
Applying Computer Vision to Art History
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art History
Ā 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
Ā 
Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)
Ā 
jQuery Recommendations to the W3C (2011)
jQuery Recommendations to the W3C (2011)jQuery Recommendations to the W3C (2011)
jQuery Recommendations to the W3C (2011)
Ā 
jQuery Open Source Process (RIT 2011)
jQuery Open Source Process (RIT 2011)jQuery Open Source Process (RIT 2011)
jQuery Open Source Process (RIT 2011)
Ā 
jQuery Open Source Process (Knight Foundation 2011)
jQuery Open Source Process (Knight Foundation 2011)jQuery Open Source Process (Knight Foundation 2011)
jQuery Open Source Process (Knight Foundation 2011)
Ā 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
Ā 
jQuery Open Source (Fronteer 2011)
jQuery Open Source (Fronteer 2011)jQuery Open Source (Fronteer 2011)
jQuery Open Source (Fronteer 2011)
Ā 
Holistic JavaScript Performance
Holistic JavaScript PerformanceHolistic JavaScript Performance
Holistic JavaScript Performance
Ā 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
Ā 
Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)
Ā 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜RTylerCroy
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
Ā 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
Ā 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationRadu Cotescu
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
Ā 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
Ā 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
Ā 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĆŗjo
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
Ā 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Ā 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Ā 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Ā 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Ā 

John Resig on performance improvements in upcoming browsers

  • 1. Performance Improvements in Browsers John Resig http://ejohn.org/ - http://twitter.com/jeresig/
  • 2. About Me Work for the Mozilla Corporation (Firefox!) āœ¦ āœ¦ Do a lot of JavaScript performance analysis āœ¦ Dromaeo.com is my performance test suite āœ¦ Tests the performance of JavaScript engines āœ¦ Tests the performance of browser DOM Creator of the jQuery JavaScript Library āœ¦ āœ¦ http://jquery.com/ āœ¦ Used by Microsoft, Google, Adobe, Nokia, IBM, Intel, CBS News, NBC, etc.
  • 3. Upcoming Browsers The browsers: āœ¦ āœ¦ Firefox 3.1 āœ¦ Safari 4 āœ¦ Internet Explorer 8 āœ¦ Opera 10 āœ¦ Google Chrome Deļ¬ning characteristics: āœ¦ āœ¦ Better performance āœ¦ Advanced JavaScript engines
  • 4. Firefox 3.1 Set to be released Spring 2009 āœ¦ Goals: āœ¦ āœ¦ Performance improvements āœ¦ Video and Audio tags āœ¦ Private browsing Beta 2 just released āœ¦ http://developer.mozilla.org/En/Firefox_3.1_for_developers āœ¦
  • 5. Safari 4 Released in conjunction with OS X 10.6 āœ¦ Features: āœ¦ āœ¦ Performance improvements āœ¦ Desktop Apps āœ¦ ACID 3 compliance āœ¦ Revamped dev tools Preview seeded to developers āœ¦ http://webkit.org/blog/ āœ¦
  • 6. Internet Explorer 8 Released early 2009 āœ¦ Features: āœ¦ āœ¦ Backwards compatibility with IE 7 āœ¦ Web Clips (trim out a part of a page and place on desktop) āœ¦ Process per tab RC1 recently āœ¦ released http://www.microsoft.com/ āœ¦ windows/internet-explorer/ beta/readiness/new-features.aspx
  • 7. Opera 10 Unspeciļ¬ed release schedule (2009?) āœ¦ Features: āœ¦ āœ¦ ACID 3 compliance āœ¦ Video and Audio tags Opera 9.6 recently released āœ¦ http://labs.opera.com/ āœ¦
  • 8. Google Chrome Chrome 1.0 September 2008 āœ¦ Features: āœ¦ āœ¦ Private browsing āœ¦ Process per tab Chrome 2.0 upcoming āœ¦ http://googlechromereleases.blogspot.com/ āœ¦
  • 9. Process Per Tab Most browsers have a single process āœ¦ āœ¦ Share memory, resources āœ¦ Pages rendered using threads IE 8 and Chrome split tabs into individual āœ¦ processes What does this change? āœ¦ āœ¦ Pages can do more processing āœ¦ (Not block the UI or other tabs) āœ¦ Tabs consume more memory
  • 10. Process Per Tab Examples of changes, in Chrome. āœ¦ Timer speed is what you set it to. āœ¦ āœ¦ Browsers cap the speed to 10ms. āœ¦ setInterval(fn, 1); Can do more non-stop processing, without āœ¦ warning: while (true) {} Chrome has a process manager (like the āœ¦ OS process manager - see CPU, Memory)
  • 11. JavaScript Engines New wave of engines: āœ¦ āœ¦ Firefox: TraceMonkey āœ¦ Safari: SquirrelFish (Extreme) āœ¦ Chrome: V8 Continually leap-frogging each other āœ¦
  • 12. Common Areas Virtual Machines āœ¦ āœ¦ Optimized to run a JavaScript-speciļ¬c bytecode Shaping āœ¦ āœ¦ Determine if two objects are similar āœ¦ Optimize behavior based upon that āœ¦ ā€œWalks like a duck, quacks like a duckā€ āœ¦ if ( obj.walks && obj.quacks ) {}
  • 13. Engine Layers JavaScript Code JavaScript Engine (C++) Virtual Bytecode Machine Machine Code
  • 14. Bytecode Speciļ¬c low-level commands āœ¦ Written in machine code āœ¦ a + b; āœ¦ PLUS( a, b ) { āœ¦ IF ISSTRING(a) OR ISSTRING(b) { return CONCAT( a, b ); } ELSE { return ADD( a, b ); } }
  • 15. Shaping Simple JavaScript code: āœ¦ obj.method() GETPROP( obj, name ) { āœ¦ IF ISOBJECT(obj) { IF HASPROP(obj, name) return PROP(obj, name); ELSE return PROTO(obj, name) } ELSE { ERROR } }
  • 16. Shaping (cont.) EXEC( prop ) { āœ¦ IF ISFN( prop ) { RUN( prop ) } ELSE { ERROR } } After shaping: āœ¦ RUN( PROP( obj, name ) ) Optimized Bytecode āœ¦
  • 17. TraceMonkey Firefox uses an engine called āœ¦ SpiderMonkey (written in C) Tracing technology layered on for Firefox āœ¦ 3.1 (dubbed ā€˜TraceMonkeyā€™) Hyper-optimizes repeating patterns into āœ¦ bytecode http://ejohn.org/blog/tracemonkey/ āœ¦
  • 18. Tracing for ( var i = 0; i < 1000; i++ ) { āœ¦ var foo = stuļ¬€[i][0]; foo = ā€œmore stuļ¬€ ā€ + someFn( foo ); } function someFn( foo ) { return foo.substr(1); } Loop is costly āœ¦ āœ¦ ISNUM(i) āœ¦ ADD(i, 1) āœ¦ COMPARE( i, 1000 )
  • 19. Function Inlining for ( var i = 0; i < 1000; i++ ) { āœ¦ var foo = stuļ¬€[i][0]; foo = ā€œmore stuļ¬€ ā€ + foo.substr(1); }
  • 20. SquirrelFish Just-in-time compilation for JavaScript āœ¦ Compiles a bytecode for common āœ¦ functionality Specialties: āœ¦ āœ¦ Bytecodes for regular expressions (super- fast) http://arstechnica.com/journals/linux.ars/2008/10/07/extreme- āœ¦ javascript-performance
  • 21. Chrome V8 Makes extensive use of shaping (fast āœ¦ property lookups) Hyper-optimized function calls and āœ¦ recursion Dynamic machine code generation āœ¦ http://code.google.com/p/v8/ āœ¦
  • 22. Measuring Speed SunSpider āœ¦ āœ¦ Released by the WebKit team last fall āœ¦ Focuses completely on JavaScript Dromaeo āœ¦ āœ¦ Released by Mozilla this spring āœ¦ Mix of JavaScript and DOM V8 Benchmark āœ¦ āœ¦ Released by Chrome team last month āœ¦ Lots of recursion testing Quality: http://ejohn.org/blog/javascript-benchmark-quality/ āœ¦
  • 27. Network Steve Soudersā€™ UA tool: āœ¦ http://stevesouders.com/ua/ Also see: YSlow āœ¦
  • 28. Simultaneous Conn. Number of downloads per domain āœ¦ Should be at least 4 āœ¦ āœ¦ FF 2, IE 6, and IE 7 are 2 āœ¦ Safari is 4 āœ¦ Everyone else is 6-7 Max connections: Number of simultaneous āœ¦ downloads āœ¦ Firefox, Opera: 25-30 āœ¦ Everyone else: 50-60
  • 29. Parallel Scripts Download scripts simultaneously āœ¦ Even though they must execute in order āœ¦ <script defer> āœ¦ āœ¦ From Internet Explorer āœ¦ Just landed for Firefox 3.1 āœ¦ In Opera as well āœ¦ Replacement for JavaScript-based loading
  • 30. Redirect Caching A simple request: āœ¦ http://foo.com -> http://www.foo.com -> http://www.foo.com/ Very costly, should be cached. āœ¦ Chrome and Firefox do well here. āœ¦
  • 31. Link Prefetching <link rel=ā€prefetchā€ href=ā€someimg.pngā€/> āœ¦ Pre-load resources for later use āœ¦ āœ¦ (images, stylesheets) Currently only in Firefox āœ¦ Replacement for JavaScript preloading āœ¦
  • 33. postMessage A way to pass messages amongst multiple āœ¦ frames and windows Implemented in all browsers (in some āœ¦ capacity). Sending a message: āœ¦ iframe.postMessage(ā€œtestā€, āœ¦ ā€œhttp://google.com/ā€);
  • 34. postMessage Receiving a Message: āœ¦ window.addEventListener(ā€messageā€, function(e){ āœ¦ if (e.origin !== ā€œhttp://example.com:8080ā€œ) return; alert( e.data ); }, false);
  • 35. Cross-Domain XHR Landed in Firefox 3.1, support in IE 8 āœ¦ Add a header to your content: āœ¦ Access-Control-Allow-Origin: * XMLHttpRequest can now pull it in, even āœ¦ across domains https://developer.mozilla.org/En/ āœ¦ HTTP_Access_Control
  • 37. Class Name New method: āœ¦ getElementsByClassName Works just like: āœ¦ getElementsByTagName Fast way of ļ¬nding elements by their class āœ¦ name(s): <div class=ā€person sidebarā€></div> document.getElementsByClassName(ā€œsidebarā€) āœ¦ Safari 3.1, Firefox 3.0, Opera 9.6 āœ¦ Drop-in replacement for existing queries āœ¦
  • 39. Selectors API querySelectorAll āœ¦ Use CSS selectors to ļ¬nd DOM elements āœ¦ document.querySelectorAll(ā€œdiv pā€) āœ¦ Good cross-browser support āœ¦ āœ¦ IE 8, Safari 4, FF 3, Opera 10 Drop-in replacement for JavaScript āœ¦ libraries.
  • 41. Traversal API W3C Speciļ¬cation āœ¦ Implemented in Firefox 3.1 āœ¦ Some methods: āœ¦ āœ¦ .nextElementSibling āœ¦ .previousElementSibling āœ¦ .ļ¬rstElementChild āœ¦ .lastElementChild Related: āœ¦ āœ¦ .children (All browsers)
  • 43. HTML 5 Dragging Includes full support drag and drop events āœ¦ Events: dragstart, dragend, dragenter, āœ¦ dragleave, dragover, drag, drop <div draggable=ā€trueā€ āœ¦ ondragstart=ā€event.dataTransfer.setData (ā€™text/plainā€™, ā€˜This text may be draggedā€™)ā€> This text <strong>may</strong> be dragged. </div> Only in Firefox 3.1 āœ¦
  • 44. Bounding getBoundingClientRect āœ¦ āœ¦ Introduced by IE āœ¦ Seeing a wider introduction Super-fast way to determine the position āœ¦ of an element Better alternative to manual computation āœ¦
  • 45. JavaScript Threads JavaScript has always been single-threaded āœ¦ Limited to working linearly āœ¦ New HTML 5 Web Workers āœ¦ Spawn JavaScript threads āœ¦ Run complicated work in the background āœ¦ āœ¦ Doesnā€™t block the browser! Drop-in usable, huge quality boost. āœ¦
  • 46. A Simple Worker var myWorker = new Worker(ā€™my_worker.jsā€™);Ā Ā  āœ¦ myWorker.onmessage = function(event)Ā {Ā Ā  alert(ā€Called back by the worker!nā€);Ā Ā  };Ā Ā 
  • 47. Styling and Eļ¬€ects Lots of commons styling eļ¬€ects āœ¦ Can be replaced and simpliļ¬ed by the āœ¦ browser Drastically simplify pages and improve āœ¦ their performance
  • 48. Rounded Corners CSS 3 speciļ¬cation āœ¦ Implemented in Safari, Firefox, Opera āœ¦ āœ¦ -moz-border-radius: 5px; āœ¦ -webkit-border-radius: 5px; Can replace clumsy, slow, old methods. āœ¦
  • 49. Shadows Box Shadows āœ¦ āœ¦ Shadow behind a div -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5) āœ¦ Text Shadows āœ¦ āœ¦ Shadow behind some text text-shadow: -1px -1px #666, 1px 1px #FFF; āœ¦ Implemented in WebKit, Firefox āœ¦ Can replace clumsy, slow, old methods. āœ¦
  • 50. Example Shadows Demos: http://maettig.com/code/css/text- āœ¦ shadow.html http://webkit.org/blog/86/box-shadow/
  • 51. Custom Fonts Load in custom fonts āœ¦ Can load TrueType fonts āœ¦ Implemented in Safari and Firefox āœ¦ Demo: http://ejohn.org/apps/fontface/ āœ¦ blok.html Can replace using Flash-based fonts. āœ¦
  • 52. Transforms and Animations Transforms allow you to rotate, scale, and āœ¦ oļ¬€set an element āœ¦ -webkit-transform: rotate(30deg); Animations allow you to morph an āœ¦ element using nothing but CSS āœ¦ -webkit-transition: all 1s ease-in-out; Implemented in WebKit and Firefox āœ¦ Demo: http://www.the-art-of-web.com/css/ āœ¦ css-animation/ Can replace JS animations, today. āœ¦
  • 53. Canvas Proposed and ļ¬rst implemented by Apple āœ¦ in WebKit A 2d drawing layer āœ¦ āœ¦ With possibilities for future expansion Embedded in web pages (looks and āœ¦ behaves like an img element) Works in all browsers (IE with ExCanvas) āœ¦ Oļ¬„oad rendering to client āœ¦ Better user interaction āœ¦
  • 54. Shapes and Paths NOT vectors (unlike SVG) āœ¦ Rectangles āœ¦ Arcs āœ¦ Lines āœ¦ Curves āœ¦ Charts: āœ¦
  • 55. Fill and Stroke All can be styled (similar to CSS) āœ¦ Stroke styles the path (or outline) āœ¦ Fill is the color of the interior āœ¦ Sparklines: āœ¦
  • 56. Canvas Embedding Canvases can consume: āœ¦ āœ¦ Images āœ¦ Other Canvases Will be able to consume (Firefox 3.1, Safari āœ¦ 4): āœ¦ Video In an extension: āœ¦ āœ¦ Web Pages
  • 57. Data
  • 58. SQL Storage Part of HTML 5 - a full client-side SQL āœ¦ database (SQLite) Implemented in WebKit āœ¦ var database = openDatabase(ā€dbā€, ā€œ1.0ā€); āœ¦ database.executeSql(ā€SELECT * FROM testā€, function(result1) { // do something with the results database.executeSql(ā€DROP TABLE testā€); });
  • 59. Native JSON JSON is a format for transferring data āœ¦ āœ¦ (Uses JavaScript syntax to achieve this.) āœ¦ Has been slow and a little hacky. Browser now have native support in āœ¦ Firefox 3.1 and IE 8 Drop-in usable, today āœ¦ āœ¦ JSON.encode(object) āœ¦ JSON.decode(string)
  • 60. Performance Encoding: āœ¦ Decoding: āœ¦
  • 62. Painting When something is physically drawn to āœ¦ the screen Hard to quantify without more āœ¦ information Firefox 3.1 includes a new event: āœ¦ MozAfterPaint Demo: http://ejohn.org/blog/browser- āœ¦ paint-events/
  • 64. Reļ¬‚ow CSS has lots of boxes in it āœ¦ Position of boxes is constantly recomputed āœ¦ and repositioned (before being painted) āœ¦ This is reļ¬‚ow Demo: http://dougt.wordpress.com/ āœ¦ 2008/05/24/what-is-a-reļ¬‚ow/
  • 65. Questions? John Resig āœ¦ http://ejohn.org/ http://twitter.com/jeresig/