Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Web Perf Navigation Timing Intro

Web Perf Navigation Timing Intro

Avatar for Haisheng, Wu

Haisheng, Wu

January 11, 2013
Tweet

Other Decks in Technology

Transcript

  1. QUICK REVIEW OF NETWORK PANEL FIREBUG V.S CHROME Blocking (Both

    but diff) DNS lookup (Firebug) SSL (Chrome)
  2. QUESTIONS? Diff between DOMContentLoaded and onload The busy indicator What

    MDN says How Javascript Loading Works - DOMContentLoaded and OnLoad
  3. QUESTIONS? Diff between DOMContentLoaded and onload The busy indicator What

    MDN says How Javascript Loading Works - DOMContentLoaded and OnLoad Parallel downloading?
  4. HTML PARSER The parsing algorithm Non-trivial . . . The

    output tree - the “parse tree” is a tree of DOM element and attribute nodes.
  5. HTML PARSER The parsing algorithm Non-trivial . . . The

    output tree - the “parse tree” is a tree of DOM element and attribute nodes. when the parsing is finished
  6. HTML PARSER The parsing algorithm Non-trivial . . . The

    output tree - the “parse tree” is a tree of DOM element and attribute nodes. when the parsing is finished mark the document as interactive
  7. HTML PARSER The parsing algorithm Non-trivial . . . The

    output tree - the “parse tree” is a tree of DOM element and attribute nodes. when the parsing is finished mark the document as interactive start parsing scripts that are in “deferred” mode - those who should be executed after the document is parsed. The document state will be then set to “complete” and a “load” event will be fired.
  8. PROCESSING SCRIPTS AND STYLE SHEETS SCRIPT scripts to be parsed

    and executed immediately when the parser reaches a <script> tag. The parsing of the document halts until the script was executed. If the script is external then the resource must be first fetched from the network. this is also done synchronously SPECULATIVE PARSING results to parallel download STYLESHEETS Firefox blocks all scripts when there is a style sheet that is still being loaded and parsed.
  9. WE LIKE THOSE EVENTS (REVISITED) domLoading HTML parsing domInteractive Finish

    parsing but loading sub-resources domContentLoadedEventStart execute scripts in “deferred” mode. execute scripts when document ready. What W3C says domContentLoadedEventEnd ??? domComplete ??? loadEventStart ajax load; anything in window.load; ect
  10. Further work debug with firebug firebug / chrome dev tool

    extension Understand Rendering / Layout / Paint stage.
  11. REFERENCE Understanding and Optimizing Web Perf Metrics W3C - Navigation

    Timing How Browser Works Performance Tools Cuzillion