SlideShare a Scribd company logo
Siamo tutti bravi
con il browser
degli altri!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
agenda
● alziamo la mano
● Cos’è un browser
● come è fatto
● i processi del browser
● come funziona
● rendering
● i motori
● conclusioni
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
quanti di noi non hanno mai detto un #?!-*!!?
Cos’è un browser
Tutti lo usano, pochi lo sanno
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
il browser
● Sono il tipo di software in assoluto più utilizzato
● Sono fatti da milioni di righe c++ ed altra roba tosta
● Sono cambiati moltissimo nel tempo
● Sono un concentrato di tecnologia ed algoritmi,
che neanche la batmobile!
è un'applicazione che richiede dati ai server
web, invia una richiesta di rete all'URL, ottiene
risorse e le rappresenta in modo interattivo!
facile, no? e che ce vo’?
Gli utenti adorano vedere i pixel sullo schermo
il più velocemente possibile,
ed è ciò che rende veloce un'applicazione web!
ma chi scrive browser ha un piccolo casino da gestire…
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
e a me che ç@#!^
me ne frega a me?
Io mica scrivo browser!
P.s. se qualcuno di voi dovesse essere del team chromium…
vi prego, siate clementi!
come sviluppatori web, abbiamo il dovere di
conoscere alcune delle meccaniche dei browser,
così da prendere decisioni migliori
e capire alcune cose che a volte ci sembrano assurde.
(cit. del famoso filosofo: ciccio da val demone)
come è fatto
siamo tutti bravi a navigare con il timone degli altri
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
L’architettura
● applicazioni multi-processo
● ogni processo si occupa di un logica
specifica
● Ogni processo ha un main thread ed
eventuali thread speciali dedicati
Non ci sono specifiche standard su come si
potrebbe costruire un browser web.
L'approccio potrebbe essere completamente
diverso da un browser ad un altro.
p
processi & thread
I processi possono comunicare tra loro attraverso IPC.
I thread possono comunicare tra loro anche all'interno del processo che li contiene, ma non direttamente con i thread in altri processi.
La comunicazione tra processi è, in generale, più lenta della comunicazione tra thread all'interno di un processo.
● Un processo può essere descritto come il
programma in esecuzione di un'applicazione.
● Un thread è quello che vive all'interno del
processo ed esegue qualsiasi parte del processo
al quale appartiene.
p
ipc
ipc
p
t
t
t
t
i processi del browser
sembra il titolo di un film ma c’è comunque tanto da investigare
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
HIGHEST LEAST
Browser Process
Render Process
IFRAME
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus
neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean
ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu
libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet
augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus.
Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus,
pellentesque id tellus vitae, lobortis fringilla ex.
Render Process
GPU Process
STORAGE
Process
UI
Process
NETWORK
Process
1 PER OGNI TAB
LOWER
PRIORITY:
Architettura multi-processo
Architettura multi-processo
● Sand-boxing
● Black Sheep Detection
● Optimal memory footprint
● Private Data
● Site Isolation
Vantaggi
● Memory Overhead
● Process Creation Overhead
● IPC overhead
SVantaggi
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
COME FUNZIONA
NAVIGARE SEMBRA FACILE, MA GUIDARE IL TITANIC È RISCHIOSO
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Scrivo sulla barra degli indirizzi e…
● viene valutato l’input
Browser process | UI thread/Process
● inizia la navigazione!
Browser process | network thread/Process
● viene letta e gestita la risposta
Browser process | network thread/Process
● Viene attivato un render process
Browser process | UI thread/Process
● viene “presa in carico” la navigazione
Render Process
● inizia la document loading phase
Render Process
https://devmyit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus
neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean
ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu
libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet
augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus.
Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus,
pellentesque id tellus vitae, lobortis fringilla ex.
Browser Process
ui
Scrivo sulla barra degli indirizzi e…
https://devmyit
NETWORK
Process
Render Process
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus
neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean
ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu
libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet
augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus.
Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus,
pellentesque id tellus vitae, lobortis fringilla ex.
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Rendering
sembra semplice, eh?
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
renderizziamo una pagina
Il processo di rendering, di cui si occupa il
buon render process, è di certo la parte più
articolata ed interessante ed è quella in cui
dobbiamo affrontare il tanto temuto
critical rendering path!
Un processo, tanti threads: main thread, worker threads,
compositor thread, raster thread, …
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus
neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean
ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu
libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet
augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus.
Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus,
pellentesque id tellus vitae, lobortis fringilla ex.
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Rendering di una pagina
● Parsing
● Style Calculation
● Layout
● Paint
● Compositing
Il processo di rendering, per buona parte
grazie al suo main thread, si snoda tra:
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
parsing
● Bytes -> characters
● characters -> token
● Token -> nodes
● nodes -> dom (finalmente!)
● Subresource loading
i dati vengono inviati su Internet come
pacchetti ed il browser legge i byte grezzi
dell’HTML (anche dal disco rigido).
al main thread il compito di:
00111100 01101000 01110100 01101101
01101100 00111110 00101110 00101110
00101110 00111100 00101111 01101000
01110100 01101101 01101100 00111110
<html><head>...</head>
<body><p>...</p></body></Html>
Start-tag: html
start-tag: head
…
end-tag: head
start-tag: body
…
bytes characters
tokens
html head p span
nodes
html
Head
link
body
span
p
…
dom tree
bytes
characters
tokens
nodes
body
span
p
…
CSSom tree
style calculation
● css Bytes -> characters
● characters -> token
● Token -> nodes
● nodes -> cssom
● layout (o render) tree!
Il main thread analizza CSS e determina il
computed style per ogni nodo del DOM in base ai
selettori CSS.
background-color: red
font-size: 1.1em
color: blue
color: yellow
margin: 10px
layout
Il layout (o reflow) è IL processo IN CUI Il
MAIN thread attraversa il DOM e gli stili e
crea IL LAYOUT TREE (O RENDER TREE), che
contiene informazioni come le coordinate
e le dimensioni DEGLI ELEMENTI.
IL PROCESSO DI LAYOUT è ESTREMAMENTE
ONEROSO PER IL BROWSER PERCHé DEVE CALCOLARE
L’ESATTA POSIZIONE E DIMENSIONE DI OGNI
ELEMENTO DELLA PAGINA!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus
neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean
ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu
libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet
augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus.
Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus,
pellentesque id tellus vitae, lobortis fringilla ex.
x,y
x,y
w,h
dom cssom
layout (o reflow)
dom + cssom = layout (o REnder) tree
layout tree
layout - Layout tree o render tree
per costruire il layout (o render) Tree, il browser
dovrà:
● attraversare ricorsivamente il dom e cercare
gli elementi visibili
● costruire / aggiornare il nodo del layout Tree
puntando il nodo del DOM
● derivare le Computed Styles per il nodo del
DOM, ed associarle con il nodo del layout Tree
layout tree
paint
conosciamo le dimensioni e le posizioni
degli elementi ma non l’ordine con il
quale li andremo a disegnare sulla nostra
pagina.
il main thread attraversa il layout tree per
costruire una coda di paint record, che
consentono di gestire l’ordine di disegno
degli elementi.
background: …
testo
box (x,y …)
,,,
Compositing
Il compositing è una tecnica per gestire parti di
una pagina in livelli, rasterizzarle
separatamente e comporre come pagina in un
thread separato chiamato compositor thread.
Se si verifica lo scrolling (una delle operazioni più
onerose ma comuni), poiché i livelli sono già
rasterizzati, tutto ciò che deve fare è comporre un nuovo
fotogramma.
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Compositing
● Il main thread esegue il traversing del
layout tree per generare il layer tree
● il main thread invia tali informazioni
nel compositor thread
● Il compositor thread rasterizza ogni livello
● Il compositor thread divide in riquadri
ed invia ogni riquadro (Draw quad) ai
raster thread
● Un compositor frame viene quindi inviato
al processo del browser tramite IPC
layout
tree
layer
tree
Compositing
● Draw quads
contiene le informazioni, come la
posizione della tile in memoria e dove nella
disegnarla nella pagina.
● Compositor frame
Una raccolta di Draw quads che
rappresentano il frame di una pagina.
Il vantaggio del compositing è che viene eseguito senza
coinvolgere il main thread!
layout
tree
layer
tree
Browser Process
Compositing - EVENTS
● Browser process riceve una gesture (click) ED invia
l’event type e le cooRDINATE AL RENDERER PROCESS
● Renderer process GESTISCE L’EVENTO NEL CASO IN CUI
CI SIA UN LISTENER
● NEL CASO IN CUI NON CI SIA IL COMPOSITOR THREAD
CREA UN FRAME SENZA CHIEDER NULLA AL MAIN THREAD!
● IL COMPOSITOR THREAD MARCA ED ASSOCIA GLI EVENT
HANDLERS ALLE AREE DELLA PAGINA (Non-Fast Scrollable Region)
NEL CASO IN CUI L’event AVVIENE FUORI DALLE REGION, IL COMPOSITOR THREAD
NON CHIEDE NUOVAMENTE NULLA AL MAIN THREAD
Render Process
ui
C
M
critical rendering path (CRP)
ogni ritardo è critico in questa occasione
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
critical rendering path (CRP)
L'intero processo tra la ricezione dei byte HTML, CSS e JS e la loro trasformazione in pixel
renderizzati sullo schermo è chiamato critical rendering path (per gli amici CRP).
network
html
css
dom tree
js
cssom tree
layout tree
paint records
layer tree
layout (reflow)
paint
compositing
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Se è in esecuzione un'animazione, una transizione, l'utente sta scorrendo le pagine o fa uno
zoom il browser deve creare frames alla frequenza di aggiornamento del dispositivo.
Sono 60 al secondo i frames per far si che un’animazione sia fluida e questo
costringe il browser a risolvere la pipeline di rendering in circa 10 ms!
critical rendering path (CRP)
altro che critical!
jank - il peggior nemico
Quando il browser non riesce a raggiungere questo obiettivo, la
frequenza dei fotogrammi diminuisce e il contenuto non sarà
fluido e ciò avrà un impatto negativo sull'esperienza dell'utente!
Questo è spesso indicato come jank!
0–100 ms — Instant feel, constant flow;
100–300 ms —Slight percetible delay;
300–1000 ms — Loss of task focus, perceptible delay;
1 s+ — Mental context switch;
10s+ — User leaves! Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
critical rendering path (CRP)
… > Style > Layout > Paint > compositing
quando ci sono cambiamenti sulle geometrie, dimensioni, posizioni, …
… > Style > Layout > Paint > compositing
quando ci sono cambiamenti in ciò che non influenza il layout (background image, text color, …)
… > Style > Layout > Paint > compositing
in poche parole ciò che non influenza il layout ed il Paint (transform, opacity)
Dopo il caricamento, la pagina cambia in risposta a due tipologie di input:
interazione dell'utente ed aggiornamenti al DOM effettuati da JavaScript.
main thread
alcune precisazioni importanti
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Una rapida distinzione
alle Web application viene concesso un singolo
thread, il main thread, per eseguire la maggior
parte della logica dell'applicazione e
dell'interfaccia utente,
i browser Web non sono assolutamente un
environment a thread singolo!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Il Browser Event Loop è probabilmente il concetto di prestazioni frontend
più importante da comprendere…ma noi già lo conosciamo, vero?
Ci basta solo sapere che ESSO vive all’interno del main thread!
Il suo comportamento determina il comportamento
delle applicazioni Web in fase di esecuzione.
Browser Event Loop
REQUESTANIMATION
FRAME
RECAP
INPUT
HANDLER
FRAME START
CALC STYLE
COMPOSITOR
THREAD
PARSE HTML LAYOUT PAINT COMPOSITE
RASTERIZE
RAST. SCHEDULE
PIXEL TO SCREEN
FRAME END
MAIN
THREAD
RENDER
PROCESS
GPU
PROCESS
REQUESTIDLE
FRAME
GPU
THREAD
i motori
e non siamo neanche a grand tour ma i motori contano
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
cosa usano?
● Chrome, edge, brave
○ render engine: blink (blinkng)
○ js engine: v8
● firefox
○ render engine: gecko (Quantum)
○ js engine: spider monkey
● safari
○ render engine: webkit
○ js engine: nitro (javascriptcore)
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
forse non è come pensavamo
il povero browser, forse, non ha quindi una vita così facile
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
QUALCHE idea?
● requestAnimationFrame | REQUESTIDLEFRAME
● WILL-CHANGE (MA CON CAUTELA)
● ASYNC / DEFER ATTRIBUTES
● WORKERS
● PRIORITà DELLE RISORSE
● VALUTARE I CSS TRIGGERS
● VALUTARE COSA FORZA LAYOUT & PAINT
● …
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
proviamo ad aiutare lo strumento che ogni
giorno ci fa viaggiare tra miliardi di pagine
piene di cose da imparare (e di gattini)!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
io lo faccio a modo mio...
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
...uso il
batcomputer,
che è potente!
...no...non così…
ma provando a scrivere
codice migliore!
Qualche link
quick references
● https://csstriggers.com/
● https://gist.github.com/paulirish/5d52fb081b3570c81e3a
Inside browser
● https://developer.chrome.com/blog/inside-browser-part1/
● https://developer.chrome.com/blog/inside-browser-part2/
● https://developer.chrome.com/blog/inside-browser-part3/
● https://developer.chrome.com/blog/inside-browser-part4/
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Qualche link
Rendering Ng
● https://developer.chrome.com/articles/renderingng/
● https://developer.chrome.com/articles/renderingng-architecture/
● https://developer.chrome.com/articles/renderingng-data-structures/
● https://developer.chrome.com/articles/blinkng/
● https://developer.chrome.com/articles/layoutng/
● https://developer.chrome.com/articles/videong/
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Qualche link
articles & sites
● https://web.dev/mainthread-work-breakdown/
● https://web.dev/fast/#prioritize-resources
● https://web.dev/optimize-javascript-execution/
● https://web.dev/simplify-paint-complexity-and-reduce-paint-areas/
● https://web.dev/avoid-large-complex-layouts-and-layout-thrashing
● https://web.dev/stick-to-compositor-only-properties-and-manage-layer-count/
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Qualche link
articles & sites
● https://www.webperf.tips/
● https://www.html5rocks.com/en/tutorials/internals/howbrowserswork
● https://blog.logrocket.com/how-browser-rendering-works-behind-scenes/
● https://www.toptal.com/web/website-performance-critical-rendering-path/
● https://grosskurth.ca/papers/browser-refarch.pdf
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
francesco sciuti
Developer per scelta e per passione,
amante di nerdaggini di ogni
tipo ed amante della
condivisione del sapere!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Software Factory
● Project Management
● Architecture Design
● Team Augmentation
● Code Review
● Mentoring
● Outsourcing
Learning Factory
● Formazione in azienda
● Corsi e Workshop
● Eventi online e offline
● questo talk!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
Le illustrazioni sono della mia amica elena pianta
https://elenapianta.it - info@elenapianta.it
grazie a tutti!
● https://www.facebook.com/francesco.sciuti
● https://www.linkedin.com/in/francescosciuti/
● https://twitter.com/FrancescoSciuti
● https://www.facebook.com/Devmy.it
● https://www.linkedin.com/company/devmyfactory/
● https://twitter.com/DevmyFactory
● https://www.instagram.com/Devmy.it/
● https://www.youtube.com/c/devmy
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel
lasciami un feedback!
Francesco Sciuti
Google Developer Expert / Microsoft MVP / Codemotion devrel

More Related Content

What's hot

서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기
YEONG-CHEON YOU
 
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
devCAT Studio, NEXON
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012Esun Kim
 
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
강 민우
 
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012devCAT Studio, NEXON
 
Game Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity SystemsGame Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity Systems
Nick Pruehs
 
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
영욱 오
 
코드 생성을 사용해 개발 속도 높이기 NDC2011
코드 생성을 사용해 개발 속도 높이기 NDC2011코드 생성을 사용해 개발 속도 높이기 NDC2011
코드 생성을 사용해 개발 속도 높이기 NDC2011Esun Kim
 
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법ChangHyun Won
 
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
devCAT Studio, NEXON
 
MTR Troubleshooting
MTR TroubleshootingMTR Troubleshooting
MTR Troubleshooting
Graham Walsh
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축sj k
 
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
Jaeseung Ha
 
Addressables for live content management – Unite Copenhagen 2019
Addressables for live content management – Unite Copenhagen 2019Addressables for live content management – Unite Copenhagen 2019
Addressables for live content management – Unite Copenhagen 2019
Unity Technologies
 
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
영준 박
 
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
devCAT Studio, NEXON
 
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
devCAT Studio, NEXON
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
Seungmo Koo
 
Windows 성능모니터를 이용한 SQL Server 성능 분석
Windows 성능모니터를 이용한 SQL Server 성능 분석Windows 성능모니터를 이용한 SQL Server 성능 분석
Windows 성능모니터를 이용한 SQL Server 성능 분석
Sung wook Kang
 

What's hot (20)

서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기
 
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
 
TBB 소개
TBB 소개TBB 소개
TBB 소개
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
 
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
[IGC 2016] 띵소프트 이득규 - 삼국지조조전 Online L10N 개발 Case Study
 
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
 
Game Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity SystemsGame Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity Systems
 
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
 
코드 생성을 사용해 개발 속도 높이기 NDC2011
코드 생성을 사용해 개발 속도 높이기 NDC2011코드 생성을 사용해 개발 속도 높이기 NDC2011
코드 생성을 사용해 개발 속도 높이기 NDC2011
 
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법
NDC2013 - 인디게임 프로젝트 중도에 포기하지 않는 방법
 
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
이승재, 실버바인 서버엔진 2 설계 리뷰, NDC2018
 
MTR Troubleshooting
MTR TroubleshootingMTR Troubleshooting
MTR Troubleshooting
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축
 
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
 
Addressables for live content management – Unite Copenhagen 2019
Addressables for live content management – Unite Copenhagen 2019Addressables for live content management – Unite Copenhagen 2019
Addressables for live content management – Unite Copenhagen 2019
 
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지
 
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
 
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
홍성우, 게임 프로그래머는 어떻게 가르치나요?, NDC2018
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
 
Windows 성능모니터를 이용한 SQL Server 성능 분석
Windows 성능모니터를 이용한 SQL Server 성능 분석Windows 성능모니터를 이용한 SQL Server 성능 분석
Windows 성능모니터를 이용한 SQL Server 성능 분석
 

Similar to Siamo tutti bravi con il browser degli altri!

Microsoft Fast - Overview
Microsoft Fast - OverviewMicrosoft Fast - Overview
Microsoft Fast - Overview
Francesco Sciuti
 
Session isolation e rendering delle pagine web
Session isolation e rendering delle pagine webSession isolation e rendering delle pagine web
Session isolation e rendering delle pagine web
Giacomo Zecchini
 
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
Gabriele Guizzardi
 
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
AndreaStagi3
 
IoT Saturday PN 2019 - S8-6 Francesco Not
IoT Saturday PN 2019 - S8-6 Francesco NotIoT Saturday PN 2019 - S8-6 Francesco Not
IoT Saturday PN 2019 - S8-6 Francesco Not
Francesco Not
 
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...jekil
 
If the future is for interdisciplinary team, we need to change something!
If the future is for interdisciplinary team, we need to change something!If the future is for interdisciplinary team, we need to change something!
If the future is for interdisciplinary team, we need to change something!Paolo Montevecchi
 
Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?
Flavius-Florin Harabor
 
Mobile UI Design
Mobile UI DesignMobile UI Design
Mobile UI Design
Simone Viani
 
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptxCome e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
Andrea Verlicchi
 
Programmiamo iPhone e iPad (e non solo!) con MonoTouch
Programmiamo iPhone e iPad (e non solo!) con MonoTouchProgrammiamo iPhone e iPad (e non solo!) con MonoTouch
Programmiamo iPhone e iPad (e non solo!) con MonoTouch
Stefano Ottaviani
 
Deno - L'anagramma di node
Deno - L'anagramma di nodeDeno - L'anagramma di node
Deno - L'anagramma di node
Francesco Sciuti
 
Sviluppare plugin per google Chrome
Sviluppare plugin per google ChromeSviluppare plugin per google Chrome
Sviluppare plugin per google Chrome
Codemotion
 
Html5 apps - GWT oriented
Html5 apps - GWT orientedHtml5 apps - GWT oriented
Html5 apps - GWT oriented
firenze-gtug
 
Meetup DotNetCode A.I. Bot Framework and Azure Functions
Meetup DotNetCode A.I. Bot Framework and Azure FunctionsMeetup DotNetCode A.I. Bot Framework and Azure Functions
Meetup DotNetCode A.I. Bot Framework and Azure Functions
dotnetcode
 
Piano Didattico Personalizzato on-line (PDP on-line)
Piano Didattico Personalizzato on-line (PDP on-line)Piano Didattico Personalizzato on-line (PDP on-line)
Piano Didattico Personalizzato on-line (PDP on-line)
Michele Maffucci
 
Programmatore_hobbysta.pdf
Programmatore_hobbysta.pdfProgrammatore_hobbysta.pdf
Programmatore_hobbysta.pdf
Jacopo Grimoldi
 
Html5
Html5Html5
XMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANTXMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANT
Luca Congiu
 
Atomic Design e sviluppo di un Design System
Atomic Design e sviluppo di un Design SystemAtomic Design e sviluppo di un Design System
Atomic Design e sviluppo di un Design System
Edoardo Sportelli
 

Similar to Siamo tutti bravi con il browser degli altri! (20)

Microsoft Fast - Overview
Microsoft Fast - OverviewMicrosoft Fast - Overview
Microsoft Fast - Overview
 
Session isolation e rendering delle pagine web
Session isolation e rendering delle pagine webSession isolation e rendering delle pagine web
Session isolation e rendering delle pagine web
 
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
Non so assolutmente niente di informatica o web ma devo comunque creare un pr...
 
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
 
IoT Saturday PN 2019 - S8-6 Francesco Not
IoT Saturday PN 2019 - S8-6 Francesco NotIoT Saturday PN 2019 - S8-6 Francesco Not
IoT Saturday PN 2019 - S8-6 Francesco Not
 
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...
Android Introduzione All Architettura Programmazione Sicurezza Serate A Tema ...
 
If the future is for interdisciplinary team, we need to change something!
If the future is for interdisciplinary team, we need to change something!If the future is for interdisciplinary team, we need to change something!
If the future is for interdisciplinary team, we need to change something!
 
Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?
 
Mobile UI Design
Mobile UI DesignMobile UI Design
Mobile UI Design
 
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptxCome e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
Come e perché ($) migliorare le prestazioni web - Aprile 2023.pptx
 
Programmiamo iPhone e iPad (e non solo!) con MonoTouch
Programmiamo iPhone e iPad (e non solo!) con MonoTouchProgrammiamo iPhone e iPad (e non solo!) con MonoTouch
Programmiamo iPhone e iPad (e non solo!) con MonoTouch
 
Deno - L'anagramma di node
Deno - L'anagramma di nodeDeno - L'anagramma di node
Deno - L'anagramma di node
 
Sviluppare plugin per google Chrome
Sviluppare plugin per google ChromeSviluppare plugin per google Chrome
Sviluppare plugin per google Chrome
 
Html5 apps - GWT oriented
Html5 apps - GWT orientedHtml5 apps - GWT oriented
Html5 apps - GWT oriented
 
Meetup DotNetCode A.I. Bot Framework and Azure Functions
Meetup DotNetCode A.I. Bot Framework and Azure FunctionsMeetup DotNetCode A.I. Bot Framework and Azure Functions
Meetup DotNetCode A.I. Bot Framework and Azure Functions
 
Piano Didattico Personalizzato on-line (PDP on-line)
Piano Didattico Personalizzato on-line (PDP on-line)Piano Didattico Personalizzato on-line (PDP on-line)
Piano Didattico Personalizzato on-line (PDP on-line)
 
Programmatore_hobbysta.pdf
Programmatore_hobbysta.pdfProgrammatore_hobbysta.pdf
Programmatore_hobbysta.pdf
 
Html5
Html5Html5
Html5
 
XMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANTXMASDEV 2018 - XMAS GIFT ASSISTANT
XMASDEV 2018 - XMAS GIFT ASSISTANT
 
Atomic Design e sviluppo di un Design System
Atomic Design e sviluppo di un Design SystemAtomic Design e sviluppo di un Design System
Atomic Design e sviluppo di un Design System
 

More from Francesco Sciuti

Creare PWA con Angular
Creare PWA con AngularCreare PWA con Angular
Creare PWA con Angular
Francesco Sciuti
 
Acadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS TodayAcadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS Today
Francesco Sciuti
 
Acadevmy - PWA Overview
Acadevmy - PWA OverviewAcadevmy - PWA Overview
Acadevmy - PWA Overview
Francesco Sciuti
 
Acadevmy - Visual Studio Code Overview
Acadevmy - Visual Studio Code OverviewAcadevmy - Visual Studio Code Overview
Acadevmy - Visual Studio Code Overview
Francesco Sciuti
 
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostriAcadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
Francesco Sciuti
 
Acadevmy - TypeScript Overview
Acadevmy - TypeScript OverviewAcadevmy - TypeScript Overview
Acadevmy - TypeScript Overview
Francesco Sciuti
 
Acadevmy - Angular Overview
Acadevmy - Angular OverviewAcadevmy - Angular Overview
Acadevmy - Angular Overview
Francesco Sciuti
 
Acadevmy - Google Conversation design
Acadevmy - Google Conversation designAcadevmy - Google Conversation design
Acadevmy - Google Conversation design
Francesco Sciuti
 
Acadevmy - PWA & Angular
Acadevmy - PWA & AngularAcadevmy - PWA & Angular
Acadevmy - PWA & Angular
Francesco Sciuti
 
Acadevmy - GraphQL & Angular: Tutto il REST è noia!
Acadevmy - GraphQL & Angular: Tutto il REST è noia!Acadevmy - GraphQL & Angular: Tutto il REST è noia!
Acadevmy - GraphQL & Angular: Tutto il REST è noia!
Francesco Sciuti
 

More from Francesco Sciuti (10)

Creare PWA con Angular
Creare PWA con AngularCreare PWA con Angular
Creare PWA con Angular
 
Acadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS TodayAcadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS Today
 
Acadevmy - PWA Overview
Acadevmy - PWA OverviewAcadevmy - PWA Overview
Acadevmy - PWA Overview
 
Acadevmy - Visual Studio Code Overview
Acadevmy - Visual Studio Code OverviewAcadevmy - Visual Studio Code Overview
Acadevmy - Visual Studio Code Overview
 
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostriAcadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostri
 
Acadevmy - TypeScript Overview
Acadevmy - TypeScript OverviewAcadevmy - TypeScript Overview
Acadevmy - TypeScript Overview
 
Acadevmy - Angular Overview
Acadevmy - Angular OverviewAcadevmy - Angular Overview
Acadevmy - Angular Overview
 
Acadevmy - Google Conversation design
Acadevmy - Google Conversation designAcadevmy - Google Conversation design
Acadevmy - Google Conversation design
 
Acadevmy - PWA & Angular
Acadevmy - PWA & AngularAcadevmy - PWA & Angular
Acadevmy - PWA & Angular
 
Acadevmy - GraphQL & Angular: Tutto il REST è noia!
Acadevmy - GraphQL & Angular: Tutto il REST è noia!Acadevmy - GraphQL & Angular: Tutto il REST è noia!
Acadevmy - GraphQL & Angular: Tutto il REST è noia!
 

Siamo tutti bravi con il browser degli altri!

  • 1. Siamo tutti bravi con il browser degli altri! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 2. agenda ● alziamo la mano ● Cos’è un browser ● come è fatto ● i processi del browser ● come funziona ● rendering ● i motori ● conclusioni Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 3. quanti di noi non hanno mai detto un #?!-*!!?
  • 4. Cos’è un browser Tutti lo usano, pochi lo sanno Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 5. il browser ● Sono il tipo di software in assoluto più utilizzato ● Sono fatti da milioni di righe c++ ed altra roba tosta ● Sono cambiati moltissimo nel tempo ● Sono un concentrato di tecnologia ed algoritmi, che neanche la batmobile! è un'applicazione che richiede dati ai server web, invia una richiesta di rete all'URL, ottiene risorse e le rappresenta in modo interattivo! facile, no? e che ce vo’?
  • 6. Gli utenti adorano vedere i pixel sullo schermo il più velocemente possibile, ed è ciò che rende veloce un'applicazione web! ma chi scrive browser ha un piccolo casino da gestire… Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 7. e a me che ç@#!^ me ne frega a me? Io mica scrivo browser! P.s. se qualcuno di voi dovesse essere del team chromium… vi prego, siate clementi!
  • 8. come sviluppatori web, abbiamo il dovere di conoscere alcune delle meccaniche dei browser, così da prendere decisioni migliori e capire alcune cose che a volte ci sembrano assurde. (cit. del famoso filosofo: ciccio da val demone)
  • 9. come è fatto siamo tutti bravi a navigare con il timone degli altri Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 10. L’architettura ● applicazioni multi-processo ● ogni processo si occupa di un logica specifica ● Ogni processo ha un main thread ed eventuali thread speciali dedicati Non ci sono specifiche standard su come si potrebbe costruire un browser web. L'approccio potrebbe essere completamente diverso da un browser ad un altro.
  • 11. p processi & thread I processi possono comunicare tra loro attraverso IPC. I thread possono comunicare tra loro anche all'interno del processo che li contiene, ma non direttamente con i thread in altri processi. La comunicazione tra processi è, in generale, più lenta della comunicazione tra thread all'interno di un processo. ● Un processo può essere descritto come il programma in esecuzione di un'applicazione. ● Un thread è quello che vive all'interno del processo ed esegue qualsiasi parte del processo al quale appartiene. p ipc ipc p t t t t
  • 12. i processi del browser sembra il titolo di un film ma c’è comunque tanto da investigare Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 13. HIGHEST LEAST Browser Process Render Process IFRAME Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus. Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus, pellentesque id tellus vitae, lobortis fringilla ex. Render Process GPU Process STORAGE Process UI Process NETWORK Process 1 PER OGNI TAB LOWER PRIORITY: Architettura multi-processo
  • 14. Architettura multi-processo ● Sand-boxing ● Black Sheep Detection ● Optimal memory footprint ● Private Data ● Site Isolation Vantaggi ● Memory Overhead ● Process Creation Overhead ● IPC overhead SVantaggi Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 15. COME FUNZIONA NAVIGARE SEMBRA FACILE, MA GUIDARE IL TITANIC È RISCHIOSO Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 16. Scrivo sulla barra degli indirizzi e… ● viene valutato l’input Browser process | UI thread/Process ● inizia la navigazione! Browser process | network thread/Process ● viene letta e gestita la risposta Browser process | network thread/Process ● Viene attivato un render process Browser process | UI thread/Process ● viene “presa in carico” la navigazione Render Process ● inizia la document loading phase Render Process https://devmyit Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus. Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus, pellentesque id tellus vitae, lobortis fringilla ex.
  • 17. Browser Process ui Scrivo sulla barra degli indirizzi e… https://devmyit NETWORK Process Render Process Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus. Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus, pellentesque id tellus vitae, lobortis fringilla ex. Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 18. Rendering sembra semplice, eh? Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 19. renderizziamo una pagina Il processo di rendering, di cui si occupa il buon render process, è di certo la parte più articolata ed interessante ed è quella in cui dobbiamo affrontare il tanto temuto critical rendering path! Un processo, tanti threads: main thread, worker threads, compositor thread, raster thread, … Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus. Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus, pellentesque id tellus vitae, lobortis fringilla ex. Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 20. Rendering di una pagina ● Parsing ● Style Calculation ● Layout ● Paint ● Compositing Il processo di rendering, per buona parte grazie al suo main thread, si snoda tra: Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 21. parsing ● Bytes -> characters ● characters -> token ● Token -> nodes ● nodes -> dom (finalmente!) ● Subresource loading i dati vengono inviati su Internet come pacchetti ed il browser legge i byte grezzi dell’HTML (anche dal disco rigido). al main thread il compito di: 00111100 01101000 01110100 01101101 01101100 00111110 00101110 00101110 00101110 00111100 00101111 01101000 01110100 01101101 01101100 00111110 <html><head>...</head> <body><p>...</p></body></Html> Start-tag: html start-tag: head … end-tag: head start-tag: body … bytes characters tokens html head p span nodes html Head link body span p … dom tree
  • 22. bytes characters tokens nodes body span p … CSSom tree style calculation ● css Bytes -> characters ● characters -> token ● Token -> nodes ● nodes -> cssom ● layout (o render) tree! Il main thread analizza CSS e determina il computed style per ogni nodo del DOM in base ai selettori CSS. background-color: red font-size: 1.1em color: blue color: yellow margin: 10px
  • 23. layout Il layout (o reflow) è IL processo IN CUI Il MAIN thread attraversa il DOM e gli stili e crea IL LAYOUT TREE (O RENDER TREE), che contiene informazioni come le coordinate e le dimensioni DEGLI ELEMENTI. IL PROCESSO DI LAYOUT è ESTREMAMENTE ONEROSO PER IL BROWSER PERCHé DEVE CALCOLARE L’ESATTA POSIZIONE E DIMENSIONE DI OGNI ELEMENTO DELLA PAGINA! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt, nunc nec tincidunt vestibulum, ante metus maximus neque, eget fringilla ante diam sed nibh. Nullam nibh libero, consequat eu ligula non, aliquet laoreet sapien. Aenean ultricies sed odio quis tempus. Vivamus facilisis tellus eget nunc venenatis malesuada. Phasellus metus metus, tincidunt eu libero a, lobortis tempus neque. Donec condimentum leo semper leo malesuada, non pretium neque dictum. Integer sit amet augue non neque dapibus pretium. Nullam id dui ac purus mattis suscipit nec ac nisl. Phasellus dignissim a risus quis cursus. Curabitur nec lacus faucibus, elementum felis nec, blandit turpis. Duis mollis enim eu tincidunt sagittis. Morbi mauris tellus, pellentesque id tellus vitae, lobortis fringilla ex. x,y x,y w,h
  • 24. dom cssom layout (o reflow) dom + cssom = layout (o REnder) tree layout tree
  • 25. layout - Layout tree o render tree per costruire il layout (o render) Tree, il browser dovrà: ● attraversare ricorsivamente il dom e cercare gli elementi visibili ● costruire / aggiornare il nodo del layout Tree puntando il nodo del DOM ● derivare le Computed Styles per il nodo del DOM, ed associarle con il nodo del layout Tree layout tree
  • 26. paint conosciamo le dimensioni e le posizioni degli elementi ma non l’ordine con il quale li andremo a disegnare sulla nostra pagina. il main thread attraversa il layout tree per costruire una coda di paint record, che consentono di gestire l’ordine di disegno degli elementi. background: … testo box (x,y …) ,,,
  • 27. Compositing Il compositing è una tecnica per gestire parti di una pagina in livelli, rasterizzarle separatamente e comporre come pagina in un thread separato chiamato compositor thread. Se si verifica lo scrolling (una delle operazioni più onerose ma comuni), poiché i livelli sono già rasterizzati, tutto ciò che deve fare è comporre un nuovo fotogramma. Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 28. Compositing ● Il main thread esegue il traversing del layout tree per generare il layer tree ● il main thread invia tali informazioni nel compositor thread ● Il compositor thread rasterizza ogni livello ● Il compositor thread divide in riquadri ed invia ogni riquadro (Draw quad) ai raster thread ● Un compositor frame viene quindi inviato al processo del browser tramite IPC layout tree layer tree
  • 29. Compositing ● Draw quads contiene le informazioni, come la posizione della tile in memoria e dove nella disegnarla nella pagina. ● Compositor frame Una raccolta di Draw quads che rappresentano il frame di una pagina. Il vantaggio del compositing è che viene eseguito senza coinvolgere il main thread! layout tree layer tree
  • 30. Browser Process Compositing - EVENTS ● Browser process riceve una gesture (click) ED invia l’event type e le cooRDINATE AL RENDERER PROCESS ● Renderer process GESTISCE L’EVENTO NEL CASO IN CUI CI SIA UN LISTENER ● NEL CASO IN CUI NON CI SIA IL COMPOSITOR THREAD CREA UN FRAME SENZA CHIEDER NULLA AL MAIN THREAD! ● IL COMPOSITOR THREAD MARCA ED ASSOCIA GLI EVENT HANDLERS ALLE AREE DELLA PAGINA (Non-Fast Scrollable Region) NEL CASO IN CUI L’event AVVIENE FUORI DALLE REGION, IL COMPOSITOR THREAD NON CHIEDE NUOVAMENTE NULLA AL MAIN THREAD Render Process ui C M
  • 31. critical rendering path (CRP) ogni ritardo è critico in questa occasione Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 32. critical rendering path (CRP) L'intero processo tra la ricezione dei byte HTML, CSS e JS e la loro trasformazione in pixel renderizzati sullo schermo è chiamato critical rendering path (per gli amici CRP). network html css dom tree js cssom tree layout tree paint records layer tree layout (reflow) paint compositing Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 33. Se è in esecuzione un'animazione, una transizione, l'utente sta scorrendo le pagine o fa uno zoom il browser deve creare frames alla frequenza di aggiornamento del dispositivo. Sono 60 al secondo i frames per far si che un’animazione sia fluida e questo costringe il browser a risolvere la pipeline di rendering in circa 10 ms! critical rendering path (CRP)
  • 35. jank - il peggior nemico Quando il browser non riesce a raggiungere questo obiettivo, la frequenza dei fotogrammi diminuisce e il contenuto non sarà fluido e ciò avrà un impatto negativo sull'esperienza dell'utente! Questo è spesso indicato come jank! 0–100 ms — Instant feel, constant flow; 100–300 ms —Slight percetible delay; 300–1000 ms — Loss of task focus, perceptible delay; 1 s+ — Mental context switch; 10s+ — User leaves! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 36. critical rendering path (CRP) … > Style > Layout > Paint > compositing quando ci sono cambiamenti sulle geometrie, dimensioni, posizioni, … … > Style > Layout > Paint > compositing quando ci sono cambiamenti in ciò che non influenza il layout (background image, text color, …) … > Style > Layout > Paint > compositing in poche parole ciò che non influenza il layout ed il Paint (transform, opacity) Dopo il caricamento, la pagina cambia in risposta a due tipologie di input: interazione dell'utente ed aggiornamenti al DOM effettuati da JavaScript.
  • 37. main thread alcune precisazioni importanti Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 38. Una rapida distinzione alle Web application viene concesso un singolo thread, il main thread, per eseguire la maggior parte della logica dell'applicazione e dell'interfaccia utente, i browser Web non sono assolutamente un environment a thread singolo! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 39. Il Browser Event Loop è probabilmente il concetto di prestazioni frontend più importante da comprendere…ma noi già lo conosciamo, vero? Ci basta solo sapere che ESSO vive all’interno del main thread! Il suo comportamento determina il comportamento delle applicazioni Web in fase di esecuzione. Browser Event Loop
  • 40. REQUESTANIMATION FRAME RECAP INPUT HANDLER FRAME START CALC STYLE COMPOSITOR THREAD PARSE HTML LAYOUT PAINT COMPOSITE RASTERIZE RAST. SCHEDULE PIXEL TO SCREEN FRAME END MAIN THREAD RENDER PROCESS GPU PROCESS REQUESTIDLE FRAME GPU THREAD
  • 41. i motori e non siamo neanche a grand tour ma i motori contano Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 42. cosa usano? ● Chrome, edge, brave ○ render engine: blink (blinkng) ○ js engine: v8 ● firefox ○ render engine: gecko (Quantum) ○ js engine: spider monkey ● safari ○ render engine: webkit ○ js engine: nitro (javascriptcore) Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 43. forse non è come pensavamo il povero browser, forse, non ha quindi una vita così facile Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 44. QUALCHE idea? ● requestAnimationFrame | REQUESTIDLEFRAME ● WILL-CHANGE (MA CON CAUTELA) ● ASYNC / DEFER ATTRIBUTES ● WORKERS ● PRIORITà DELLE RISORSE ● VALUTARE I CSS TRIGGERS ● VALUTARE COSA FORZA LAYOUT & PAINT ● … Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 45. proviamo ad aiutare lo strumento che ogni giorno ci fa viaggiare tra miliardi di pagine piene di cose da imparare (e di gattini)! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 46. io lo faccio a modo mio... Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 48. ...no...non così… ma provando a scrivere codice migliore!
  • 49. Qualche link quick references ● https://csstriggers.com/ ● https://gist.github.com/paulirish/5d52fb081b3570c81e3a Inside browser ● https://developer.chrome.com/blog/inside-browser-part1/ ● https://developer.chrome.com/blog/inside-browser-part2/ ● https://developer.chrome.com/blog/inside-browser-part3/ ● https://developer.chrome.com/blog/inside-browser-part4/ Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 50. Qualche link Rendering Ng ● https://developer.chrome.com/articles/renderingng/ ● https://developer.chrome.com/articles/renderingng-architecture/ ● https://developer.chrome.com/articles/renderingng-data-structures/ ● https://developer.chrome.com/articles/blinkng/ ● https://developer.chrome.com/articles/layoutng/ ● https://developer.chrome.com/articles/videong/ Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 51. Qualche link articles & sites ● https://web.dev/mainthread-work-breakdown/ ● https://web.dev/fast/#prioritize-resources ● https://web.dev/optimize-javascript-execution/ ● https://web.dev/simplify-paint-complexity-and-reduce-paint-areas/ ● https://web.dev/avoid-large-complex-layouts-and-layout-thrashing ● https://web.dev/stick-to-compositor-only-properties-and-manage-layer-count/ Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 52. Qualche link articles & sites ● https://www.webperf.tips/ ● https://www.html5rocks.com/en/tutorials/internals/howbrowserswork ● https://blog.logrocket.com/how-browser-rendering-works-behind-scenes/ ● https://www.toptal.com/web/website-performance-critical-rendering-path/ ● https://grosskurth.ca/papers/browser-refarch.pdf Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 53. francesco sciuti Developer per scelta e per passione, amante di nerdaggini di ogni tipo ed amante della condivisione del sapere! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 54. Software Factory ● Project Management ● Architecture Design ● Team Augmentation ● Code Review ● Mentoring ● Outsourcing Learning Factory ● Formazione in azienda ● Corsi e Workshop ● Eventi online e offline ● questo talk! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 55. Le illustrazioni sono della mia amica elena pianta https://elenapianta.it - info@elenapianta.it
  • 56. grazie a tutti! ● https://www.facebook.com/francesco.sciuti ● https://www.linkedin.com/in/francescosciuti/ ● https://twitter.com/FrancescoSciuti ● https://www.facebook.com/Devmy.it ● https://www.linkedin.com/company/devmyfactory/ ● https://twitter.com/DevmyFactory ● https://www.instagram.com/Devmy.it/ ● https://www.youtube.com/c/devmy Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel
  • 57. lasciami un feedback! Francesco Sciuti Google Developer Expert / Microsoft MVP / Codemotion devrel