SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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)
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Último (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

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