SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Chrome Dev Tools
  @matenadasdi
    Ustream
Ustream browser stats
Why do we need a dev tool?


●   Javascript is an interpreted language

●   HTML, CSS debugging and performance optimization is impossible

●   Logging, debugging network requests is essential

●   Source and the final output could be totally different
Why Chrome?

●   Native and really fast support

●   Canary build implements new features in short intervals

●   Frame / Memory Profiling tools

●   Action history

●   Google is leading in new technologies

●   Firefox native dev tools could be a rival
Red - Blue - Yellow




● Chrome channels
  ○ Stable (Releases in every 6 weeks)
  ○ Beta (1 month before stable, weekly releases)
  ○ Dev (twice weekly)
  ○ Canary (daily)
● Chromium
DevTools UI Basics
What is Webkit?

Browser components:

● Parsing (HTML, XML, CSS, Javascript)
● Layout
● Text and graphics rendering
● Image Decoding
● GPU interaction
● Network access
● Hardware acceleration
Webkit - different ports




          Common webkit features

           ●   DOM, CSSOM
           ●   CSS Parsing
           ●   HTML parsing, DOM construction
           ●   Layout, positioning
           ●   DevTools UI (except Safari)
           ●   Features like: File API, CSS Transform
               Math, web Audio API, localStorage

                                               source: Paul Irish
Webkit - From source to DOM tree




●   DOM Tree

●   Render Object Tree

●   Render Layer Tree   (forces to get new: transparency, relative, absolute, transform, filter, root element of the page, etc.)



●   GraphicsLayer Tree (HW acc path)

●   Continuous output
Elements panel - DOM Manipulation


●   Keyboard action support

●   History

●   Magnifier

●   Parent-child horizontal representation
Elements panel - Styles


●   Computed styles exactly as the renderer sees

●   Force new rules as inline styles

●   Force states

●   Matched CSS rules

●   Color picker with different formats
Resources panel - Browser storages and their specialties


 ● WebSQL (SQLite, deprecated, needs permission to break the limit)
 ● IndexedDB
     ○    Asnyc, transactional, noSQL

     ○    FF asks for permission over ~50MB

     ○    Chrome lets (Disk space / 2 * 0.20) space for offline storage


 ● Application cache: Cache / Network / fallback (~5 MB / origin)
 ● LocalStorage - Permanent ( 2.5MB Chrome - 5 MB FF - 10MB IE / Origin )
 ● SessionStorage - Session only ( System memory )
 ● Cookies - Not modifiable (~4KB / origin)
Network panel


● Timeline waterfall for visualization

● Check parallelism

● HAR export (HTTP Archive)

● Cache efficiency
Don't be shy to use breakpoints!

● For debugging Javascript execution
  ○ Watch expressions
  ○ Call stack
  ○ Scope variables

● Event listener breakpoints
● DOM Breakpoints
● XHR breakpoints
Timeline panel - Reflow & Repaint


Reflow:
Parts of the render tree needs to be revalidated and node dimensions should be
recalculated.




Repaint:
Some part of the screen needs to be updated because of a reflow, node geometric
change or style change.

Can be tested with 'show paint rectangles' feature.
Timeline panel - Reflow & Repaint optimization

●   Display: none and visibility: hidden is a good example for reflow & repaint


● Do not change styles one-by-one

● Detach DOM parts before huge manipulation

● Querying the DOM could be painful too
  ○ offsetTop, offsetLeft, offsetHeight, offsetWidth
  ○ scrollTop, scrollLeft, scrollHeight, scrollWidth
  ○ clientTop, clientLeft, clientHeight, clientWidth
  ○ getComputedStyle()

● Do not forget the browser queue of changes
GPU Accelerated rendering
                                                                            Hardware path:
              Software path:




Differences:

 ●   RenderLayers could paint to an own backing surface called Compositing Layer

 ●   Each compositing layer has its own GraphicContext

 ●   New tree added: GraphicsLayer Tree

 ●   DOM Tree - Render Object Tree - Render layer Tree - GraphicsLayer Tree

 ●   H/W acc. Force examples: video tag, canvas 3D context, transform transition, CSS filter, etc
GPU Accelerated rendering - scrolling

● Damage Rect

● Repaint only intersected RenderLayers

● GPU 256x256px tiles

● Paint and upload the damaged tiles

● Tile-prepainting

● Different thread for compositing
Timeline panel - Frames
● Tearing

● vSync - generating new frames only between screen refreshes

● 60 HZ = We have got 16 ms only! ( 60 Hz = 1 / ~0,016)

●   setInterval, setTimeout fails because of javascript timers, and different frame rates


●   requestAnimationFrame
Memory profiles

● GC Cycles

● Heap snapshot

● Comparison

● Containment
Audits & Console
Settings panel

● chrome://flags

● Overrides, emulations

● Rulers

● Disable cache / JS

● Show Paint rectangles, Composited layer
  borders, Continuous repainting
Thanks!
  Mate Nadasdi

Contenu connexe

Tendances

NGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsNGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsdavrous
 
Javascript basics
Javascript basicsJavascript basics
Javascript basicsFalcon2018
 
Skillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Group
 
Improving Game Performance in the Browser
Improving Game Performance in the BrowserImproving Game Performance in the Browser
Improving Game Performance in the BrowserFITC
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17GreeceJS
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsdavrous
 
Html5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsHtml5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsEngin Hatay
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 
Custom elements - An alternate Render API for decoupled Drupal
Custom elements - An alternate Render API for decoupled DrupalCustom elements - An alternate Render API for decoupled Drupal
Custom elements - An alternate Render API for decoupled Drupalnuppla
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is moreBen Lau
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersnuppla
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausWomen in Technology Poland
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers workNeoito
 
Comparisons of web languages
Comparisons of web languagesComparisons of web languages
Comparisons of web languagesEvelyn Loh
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An IntroductionNirvanic Labs
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)Rajat Pratap Singh
 

Tendances (20)

NGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsNGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.js
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Skillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Dust JS Template
Skillwise Dust JS Template
 
Improving Game Performance in the Browser
Improving Game Performance in the BrowserImproving Game Performance in the Browser
Improving Game Performance in the Browser
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
 
OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
Html5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsHtml5 Canvas and Mobile Graphics
Html5 Canvas and Mobile Graphics
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
Custom elements - An alternate Render API for decoupled Drupal
Custom elements - An alternate Render API for decoupled DrupalCustom elements - An alternate Render API for decoupled Drupal
Custom elements - An alternate Render API for decoupled Drupal
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is more
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
 
OpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in actionOpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in action
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers work
 
OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9
 
Comparisons of web languages
Comparisons of web languagesComparisons of web languages
Comparisons of web languages
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An Introduction
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)
 

En vedette

Optimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 confOptimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 confMáté Nádasdi
 
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...Google Developer Relations Team
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureTroy Miles
 
Using Chrome Dev Tools
Using Chrome Dev ToolsUsing Chrome Dev Tools
Using Chrome Dev ToolsMicah Wood
 
Google Chrome developer tools
Google Chrome developer toolsGoogle Chrome developer tools
Google Chrome developer toolsDaniel Siepmann
 

En vedette (6)

Optimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 confOptimizing browser experience - App!mobile 2013 conf
Optimizing browser experience - App!mobile 2013 conf
 
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...
Google Developer Day 2010 Japan: Google Chrome の Developer Tools (ミカイル ナガノフ, ...
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
 
Chrome dev tool
Chrome dev toolChrome dev tool
Chrome dev tool
 
Using Chrome Dev Tools
Using Chrome Dev ToolsUsing Chrome Dev Tools
Using Chrome Dev Tools
 
Google Chrome developer tools
Google Chrome developer toolsGoogle Chrome developer tools
Google Chrome developer tools
 

Similaire à Chrome Dev Tools: Essential Tools for Debugging and Optimizing Web Apps

Parallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptxParallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptxGuy Bary
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Dev tools rendering & memory profiling
Dev tools rendering & memory profilingDev tools rendering & memory profiling
Dev tools rendering & memory profilingOpen Academy
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesDrupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesSkilld
 
Performance & dev tools
Performance & dev toolsPerformance & dev tools
Performance & dev toolsGuy Yogev
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Corey Clark, Ph.D.
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)Igalia
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsAMD Developer Central
 
Scaling Magento
Scaling MagentoScaling Magento
Scaling MagentoCopious
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionDzmitry Varabei
 
AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentShean McManus
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdfmraaaaa
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend PerformanceThomas Weinert
 
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Per Henrik Lausten
 
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...David Amend
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkAlive Kuo
 
Servo: A Web View From Somewhere Else
Servo: A Web View From Somewhere ElseServo: A Web View From Somewhere Else
Servo: A Web View From Somewhere ElseIgalia
 

Similaire à Chrome Dev Tools: Essential Tools for Debugging and Optimizing Web Apps (20)

Parallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptxParallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptx
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Dev tools rendering & memory profiling
Dev tools rendering & memory profilingDev tools rendering & memory profiling
Dev tools rendering & memory profiling
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web SitesDrupal Camp Kiev 2012 - High Performance Drupal Web Sites
Drupal Camp Kiev 2012 - High Performance Drupal Web Sites
 
Performance & dev tools
Performance & dev toolsPerformance & dev tools
Performance & dev tools
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
 
Scaling Magento
Scaling MagentoScaling Magento
Scaling Magento
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and Composition
 
AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web Development
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdf
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)
 
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web framework
 
Servo: A Web View From Somewhere Else
Servo: A Web View From Somewhere ElseServo: A Web View From Somewhere Else
Servo: A Web View From Somewhere Else
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
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
 
🐬 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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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...
 

Chrome Dev Tools: Essential Tools for Debugging and Optimizing Web Apps

  • 1. Chrome Dev Tools @matenadasdi Ustream
  • 3. Why do we need a dev tool? ● Javascript is an interpreted language ● HTML, CSS debugging and performance optimization is impossible ● Logging, debugging network requests is essential ● Source and the final output could be totally different
  • 4. Why Chrome? ● Native and really fast support ● Canary build implements new features in short intervals ● Frame / Memory Profiling tools ● Action history ● Google is leading in new technologies ● Firefox native dev tools could be a rival
  • 5. Red - Blue - Yellow ● Chrome channels ○ Stable (Releases in every 6 weeks) ○ Beta (1 month before stable, weekly releases) ○ Dev (twice weekly) ○ Canary (daily) ● Chromium
  • 7. What is Webkit? Browser components: ● Parsing (HTML, XML, CSS, Javascript) ● Layout ● Text and graphics rendering ● Image Decoding ● GPU interaction ● Network access ● Hardware acceleration
  • 8. Webkit - different ports Common webkit features ● DOM, CSSOM ● CSS Parsing ● HTML parsing, DOM construction ● Layout, positioning ● DevTools UI (except Safari) ● Features like: File API, CSS Transform Math, web Audio API, localStorage source: Paul Irish
  • 9. Webkit - From source to DOM tree ● DOM Tree ● Render Object Tree ● Render Layer Tree (forces to get new: transparency, relative, absolute, transform, filter, root element of the page, etc.) ● GraphicsLayer Tree (HW acc path) ● Continuous output
  • 10. Elements panel - DOM Manipulation ● Keyboard action support ● History ● Magnifier ● Parent-child horizontal representation
  • 11. Elements panel - Styles ● Computed styles exactly as the renderer sees ● Force new rules as inline styles ● Force states ● Matched CSS rules ● Color picker with different formats
  • 12. Resources panel - Browser storages and their specialties ● WebSQL (SQLite, deprecated, needs permission to break the limit) ● IndexedDB ○ Asnyc, transactional, noSQL ○ FF asks for permission over ~50MB ○ Chrome lets (Disk space / 2 * 0.20) space for offline storage ● Application cache: Cache / Network / fallback (~5 MB / origin) ● LocalStorage - Permanent ( 2.5MB Chrome - 5 MB FF - 10MB IE / Origin ) ● SessionStorage - Session only ( System memory ) ● Cookies - Not modifiable (~4KB / origin)
  • 13. Network panel ● Timeline waterfall for visualization ● Check parallelism ● HAR export (HTTP Archive) ● Cache efficiency
  • 14. Don't be shy to use breakpoints! ● For debugging Javascript execution ○ Watch expressions ○ Call stack ○ Scope variables ● Event listener breakpoints ● DOM Breakpoints ● XHR breakpoints
  • 15. Timeline panel - Reflow & Repaint Reflow: Parts of the render tree needs to be revalidated and node dimensions should be recalculated. Repaint: Some part of the screen needs to be updated because of a reflow, node geometric change or style change. Can be tested with 'show paint rectangles' feature.
  • 16. Timeline panel - Reflow & Repaint optimization ● Display: none and visibility: hidden is a good example for reflow & repaint ● Do not change styles one-by-one ● Detach DOM parts before huge manipulation ● Querying the DOM could be painful too ○ offsetTop, offsetLeft, offsetHeight, offsetWidth ○ scrollTop, scrollLeft, scrollHeight, scrollWidth ○ clientTop, clientLeft, clientHeight, clientWidth ○ getComputedStyle() ● Do not forget the browser queue of changes
  • 17. GPU Accelerated rendering Hardware path: Software path: Differences: ● RenderLayers could paint to an own backing surface called Compositing Layer ● Each compositing layer has its own GraphicContext ● New tree added: GraphicsLayer Tree ● DOM Tree - Render Object Tree - Render layer Tree - GraphicsLayer Tree ● H/W acc. Force examples: video tag, canvas 3D context, transform transition, CSS filter, etc
  • 18. GPU Accelerated rendering - scrolling ● Damage Rect ● Repaint only intersected RenderLayers ● GPU 256x256px tiles ● Paint and upload the damaged tiles ● Tile-prepainting ● Different thread for compositing
  • 19. Timeline panel - Frames ● Tearing ● vSync - generating new frames only between screen refreshes ● 60 HZ = We have got 16 ms only! ( 60 Hz = 1 / ~0,016) ● setInterval, setTimeout fails because of javascript timers, and different frame rates ● requestAnimationFrame
  • 20. Memory profiles ● GC Cycles ● Heap snapshot ● Comparison ● Containment
  • 22. Settings panel ● chrome://flags ● Overrides, emulations ● Rulers ● Disable cache / JS ● Show Paint rectangles, Composited layer borders, Continuous repainting
  • 23. Thanks! Mate Nadasdi