SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
웹브라우저 엔진의 구조와 원리
( Understanding Open Source Rendering Engine )
이형욱 (hyungwook.lee@navercorp.com)
시스템스컴퓨팅G / NAVER LABS
2014-05
2
0. Contents
Chapter 1: How browsers work
① Browser at High Level
② Major Browser’s Rendering Engine
③ Summary of browser main flows.
④ HTML Parser
⑤ Render Tree
⑥ Layout
⑦ Paint
Chapter 2: Advanced Rendering Technology
① Types of rendering path
② Software Rendering Path
③ Hardware Rendering Path
④ Threaded Compositor
⑤ Threaded Rasterization
Chapter 3: How to improve rendering performance
① Understanding Dev Tools
② CSS properties by style operation required
③ Use layers to improve performance
④ Layers in WebKit
⑤ Cost of multi layers
⑥ Paul’s Guideline for Animation
3
Chapter 1, How browsers work
4
1. Browser at High Level
CodeCoverage
10%
90%
UI
Browser Engine
Rendering Engine
Network I/O
JavaScript
Engine
Graphics
Stack
DataPersistence
5
2. Major Browser’s Rendering Engine
6
<html>
<head>
<title> NAVER </title>
</head>
<body>
<div>
<h1> Hello </h1>
<p> World </p>
</div>
</body>
</html>
3. Summary of browser main flows.
7
DOM: Document Object Model
- Document = HTML, well-formed XML
- Object Model = Data + Method
Standard way for accessing and manipulating documents.
+
4. HTML Parser (1/2): DOM
8
HEAD
TITLE
NAVER
BODY
DIV
H1 P
HTML
Hello World
<html>
<head>
<title> NAVER </title>
</head>
<body>
<div>
<h1> Hello </h1>
<p> World </p>
</div>
</body>
</html>
4. HTML Parser (2/2): Example
9
5. Render Tree (1/4): CSS Box model
html, address,
blockquote,
body, dd, div,
dl, dt, fieldset, form,
frame, frameset,
h1, h2, h3, h4,
h5, h6, noframes,
ol, p, ul, center,
dir, hr, menu, pre { display: block;}
* Default display property: inline
Default style sheet for HTML 4
The way the box is layed out is determined by
 Box type: inline, block
 Box dimensions: width, height
 Positioning scheme: static, absolute, fixed, relative
 External information: image size / view port size
10
5. Render Tree (2/4): Visual formatting Model
< Relative Positioning >< Normal Flow >
< Block formatting context >
< Inline formatting context >
11
HTML
CSS
DOM
Tree
Style
Rules
Renderer
TreeLookup
5. Render Tree (3/4): Render Tree flows
12
HEAD
TITLE
NAVER
BODY
DIV
H1 P
HTML
Hello World
Block
Block
Block
Block Block
Inline Inline
5. Render Tree (4/4): Example
13
6. Layout (1/2): Algorithm Overview
1. CSS 2.1 Visual formatting Model.
1) Normal Flow
① Block formatting contexts
② Inline formatting contexts
③ Relative positioning
2) Floats
3) Absolute positioning
2. Global and incremental layout
3. Dirty bit system
4. Asynchronous and Synchronous layout
dirty
< Incremental layout >
14
6. Layout (2/2): Example
HEAD
TITLE
NAVER
BODY
DIV
H1 P
HTML
Hello World
Block
Block
Block
Block Block
Inline Inline
(0, 0, 1024, 768)
(0, 0, 1024, 768)
(0, 0, 1024, 55)
(10, 20, 1024, 37) (10, 80, 1024, 18)
15
7. Paint
Block (html)
Block (body)
Block (div)
Block (h1) Block (p)
Inline (hello) Inline (world)
(0, 0, 1024, 768)
(0, 0, 1024, 768)
(0, 0, 1024, 55)
(10, 20, 1024, 37) (10, 80, 1024, 18) 1024
768<div>
16
Chapter 2, Advanced Rendering Technology
17
1. Non-composited SW rendering (Traditional)
2. Composited SW rendering
3. Composited GPU rendering
1. Types of rendering path
18
2. Rendering Path : Software Rendering Path
1. Renderer Process에서 skia를 이용하여 bitmap을 생성 (필요 시 compositing)
2. Shared Memory를 이용하여 Browser Process에 전달하여 화면에 Update.
19
2. Rendering Path : Hardware Rendering Path
1. 각 Layer 별 bitmap을 생성 (Render Layer traversing)
2. Textures upload into Video memory
3. Compositor에서 Layer 순서에 맞게 Texture를 drawing하여 화면에 Update
20
3. Rendering (1/2): Ideal
21
3. Rendering (2/2): Real
22
4. Threaded Compositor
23
5. Threaded Rasterization
24
Chapter 3, How to improve rendering performance
25
1. Understanding Dev Tools
26
https://docs.google.com/spreadsheet/pub?key=0ArK1Uipy0SbDdHVLc1ozTFlja1dhb25QNGhJMXN5MXc&single=true&gid=0&output=html
2. CSS properties by style operation required
27
3. Use layers to improve performance
< Multi layer mode using translate3d>
< Single layer mode>
28
4. Layers in WebKit
1. It's the root object for the page. <html>
2. CSS position properties (relative, absolute or a
transform)
3. It is transparent
4. Has overflow, an alpha mask or reflection
5. Has a CSS filter
6. <canvas>
7. <video>
29
• Compositing 처리시 필요한 Memory 사용량 및 작업량 증가
5. Cost of multi layers
<Layer를 너무 많이 사용할 경우 Compositing 시간이 오래 걸림>
30
1. Use “opacity, translate, rotate and scale”
2. Use reqeustAnimateFrame. Avoid setTimeout,
setInterval
3. Use Browser Optimized CSS animation. Avoid Jquery
animate()
6. Paul’s Guideline for Animation
< Paul Irish >
31
32
Appendix #1: Vocabulary
33
Appendix #2: References
1. http://www.w3.org/TR/CSS2/
2. http://www.w3.org/TR/DOM-Level-2-Core/core.html
3. http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/
4. http://deview.kr/2013/detail.nhn?topicSeq=5
5. http://www.slideshare.net/joone/hardware-acceleration-in-webkit
6. http://dev.chromium.org/developers/design-documents/multi-process-architecture
7. http://dev.chromium.org/developers/design-documents/displaying-a-web-page-in-
chrome
8. http://dev.chromium.org/developers/design-documents/inter-process-communication
9. http://dev.chromium.org/developers/design-documents/multi-process-resource-
loading
10. http://dev.chromium.org/developers/design-documents/gpu-accelerated-
compositing-in-chrome
11. http://dev.chromium.org/developers/design-documents/compositor-thread-
architecture
12. http://dev.chromium.org/developers/design-documents/impl-side-painting

Contenu connexe

Tendances

Brad Enterprise Solution Architect
Brad Enterprise Solution ArchitectBrad Enterprise Solution Architect
Brad Enterprise Solution Architect
Brad Travis
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
Hyungwook Lee
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
Karambir Singh Nain
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
Miroslav Resetar
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
Ariya Hidayat
 

Tendances (20)

웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
 
Android chromium web view
Android chromium web viewAndroid chromium web view
Android chromium web view
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
Chromium ui framework(shared)
Chromium ui framework(shared)Chromium ui framework(shared)
Chromium ui framework(shared)
 
Hardware Acceleration in WebKit
Hardware Acceleration in WebKitHardware Acceleration in WebKit
Hardware Acceleration in WebKit
 
Brad Enterprise Solution Architect
Brad Enterprise Solution ArchitectBrad Enterprise Solution Architect
Brad Enterprise Solution Architect
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
 
2011淘宝首页开发实践
2011淘宝首页开发实践2011淘宝首页开发实践
2011淘宝首页开发实践
 
Built to Last
Built to LastBuilt to Last
Built to Last
 
Browsers on Android (Webkit,chromium)
Browsers on Android (Webkit,chromium)Browsers on Android (Webkit,chromium)
Browsers on Android (Webkit,chromium)
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
 
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
 
Reasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScriptReasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScript
 
WordPress and Zend Framework Integration with Vulnero
WordPress and Zend Framework Integration with VulneroWordPress and Zend Framework Integration with Vulnero
WordPress and Zend Framework Integration with Vulnero
 
Chrome & Webkit overview
Chrome & Webkit overviewChrome & Webkit overview
Chrome & Webkit overview
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
 
Aem Training Tutorials for Beginners
Aem  Training Tutorials for BeginnersAem  Training Tutorials for Beginners
Aem Training Tutorials for Beginners
 
The Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer ToolsThe Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer Tools
 

En vedette

[D2 오픈세미나]4.진보된개발환경 주우영
[D2 오픈세미나]4.진보된개발환경 주우영[D2 오픈세미나]4.진보된개발환경 주우영
[D2 오픈세미나]4.진보된개발환경 주우영
NAVER D2
 
[D2 오픈세미나]1.html5 api 옥상훈
[D2 오픈세미나]1.html5 api 옥상훈[D2 오픈세미나]1.html5 api 옥상훈
[D2 오픈세미나]1.html5 api 옥상훈
NAVER D2
 
[D2 오픈세미나]5.html5 api 테트리스게임_이진권
[D2 오픈세미나]5.html5 api 테트리스게임_이진권[D2 오픈세미나]5.html5 api 테트리스게임_이진권
[D2 오픈세미나]5.html5 api 테트리스게임_이진권
NAVER D2
 
[D2 오픈세미나]3.자바스크립트mean스택 김태훈
[D2 오픈세미나]3.자바스크립트mean스택 김태훈[D2 오픈세미나]3.자바스크립트mean스택 김태훈
[D2 오픈세미나]3.자바스크립트mean스택 김태훈
NAVER D2
 
2.네이버 프론트엔드 김지태
2.네이버 프론트엔드 김지태2.네이버 프론트엔드 김지태
2.네이버 프론트엔드 김지태
NAVER D2
 
1.openseminar
1.openseminar1.openseminar
1.openseminar
NAVER D2
 
5.yobi를 활용한 개발자 협업 및 배포 프로세스
5.yobi를 활용한 개발자 협업 및 배포 프로세스5.yobi를 활용한 개발자 협업 및 배포 프로세스
5.yobi를 활용한 개발자 협업 및 배포 프로세스
NAVER D2
 
네이버 오픈세미나 백엔드_아키텍쳐
네이버 오픈세미나 백엔드_아키텍쳐네이버 오픈세미나 백엔드_아키텍쳐
네이버 오픈세미나 백엔드_아키텍쳐
NAVER D2
 
다함께, FluxUtils 한바퀴!
다함께, FluxUtils 한바퀴!다함께, FluxUtils 한바퀴!
다함께, FluxUtils 한바퀴!
우영 주
 
[Hello world]nodejs helloworld chaesuwon
[Hello world]nodejs helloworld chaesuwon[Hello world]nodejs helloworld chaesuwon
[Hello world]nodejs helloworld chaesuwon
NAVER D2
 
[Hello world]git internal
[Hello world]git internal[Hello world]git internal
[Hello world]git internal
NAVER D2
 

En vedette (20)

[D2 오픈세미나]4.진보된개발환경 주우영
[D2 오픈세미나]4.진보된개발환경 주우영[D2 오픈세미나]4.진보된개발환경 주우영
[D2 오픈세미나]4.진보된개발환경 주우영
 
[D2 오픈세미나]1.html5 api 옥상훈
[D2 오픈세미나]1.html5 api 옥상훈[D2 오픈세미나]1.html5 api 옥상훈
[D2 오픈세미나]1.html5 api 옥상훈
 
[D2 오픈세미나]5.html5 api 테트리스게임_이진권
[D2 오픈세미나]5.html5 api 테트리스게임_이진권[D2 오픈세미나]5.html5 api 테트리스게임_이진권
[D2 오픈세미나]5.html5 api 테트리스게임_이진권
 
[D2 오픈세미나]3.자바스크립트mean스택 김태훈
[D2 오픈세미나]3.자바스크립트mean스택 김태훈[D2 오픈세미나]3.자바스크립트mean스택 김태훈
[D2 오픈세미나]3.자바스크립트mean스택 김태훈
 
2.네이버 프론트엔드 김지태
2.네이버 프론트엔드 김지태2.네이버 프론트엔드 김지태
2.네이버 프론트엔드 김지태
 
Arcus
ArcusArcus
Arcus
 
1.openseminar
1.openseminar1.openseminar
1.openseminar
 
5.yobi를 활용한 개발자 협업 및 배포 프로세스
5.yobi를 활용한 개발자 협업 및 배포 프로세스5.yobi를 활용한 개발자 협업 및 배포 프로세스
5.yobi를 활용한 개발자 협업 및 배포 프로세스
 
네이버 오픈세미나 백엔드_아키텍쳐
네이버 오픈세미나 백엔드_아키텍쳐네이버 오픈세미나 백엔드_아키텍쳐
네이버 오픈세미나 백엔드_아키텍쳐
 
[토크아이티] 프런트엔드 개발 시작하기 저자 특강
[토크아이티] 프런트엔드 개발 시작하기 저자 특강 [토크아이티] 프런트엔드 개발 시작하기 저자 특강
[토크아이티] 프런트엔드 개발 시작하기 저자 특강
 
다함께, FluxUtils 한바퀴!
다함께, FluxUtils 한바퀴!다함께, FluxUtils 한바퀴!
다함께, FluxUtils 한바퀴!
 
역시 Redux
역시 Redux역시 Redux
역시 Redux
 
Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까? Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까?
 
[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅
 
[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선[D2 오픈세미나]1.무한스크롤성능개선
[D2 오픈세미나]1.무한스크롤성능개선
 
[D2대학생세미나]산넘어 산, 음원서비스 세이렌 개발기
[D2대학생세미나]산넘어 산, 음원서비스 세이렌 개발기[D2대학생세미나]산넘어 산, 음원서비스 세이렌 개발기
[D2대학생세미나]산넘어 산, 음원서비스 세이렌 개발기
 
Do you Promise?
Do you Promise?Do you Promise?
Do you Promise?
 
[D2 오픈세미나]5.robolectric 안드로이드 테스팅
[D2 오픈세미나]5.robolectric 안드로이드 테스팅[D2 오픈세미나]5.robolectric 안드로이드 테스팅
[D2 오픈세미나]5.robolectric 안드로이드 테스팅
 
[Hello world]nodejs helloworld chaesuwon
[Hello world]nodejs helloworld chaesuwon[Hello world]nodejs helloworld chaesuwon
[Hello world]nodejs helloworld chaesuwon
 
[Hello world]git internal
[Hello world]git internal[Hello world]git internal
[Hello world]git internal
 

Similaire à [D2 오픈세미나]2.browser engine 이형욱_20140523

Sharepoint development 2013 course content | sharepoint 2013 course content
Sharepoint development 2013 course content | sharepoint  2013 course contentSharepoint development 2013 course content | sharepoint  2013 course content
Sharepoint development 2013 course content | sharepoint 2013 course content
Global Online Trainings
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government Developers
Frank La Vigne
 
How browsers work landscape
How browsers work landscapeHow browsers work landscape
How browsers work landscape
anandkishore
 

Similaire à [D2 오픈세미나]2.browser engine 이형욱_20140523 (20)

Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
 
Dot Net Nuke Presentation
Dot Net Nuke PresentationDot Net Nuke Presentation
Dot Net Nuke Presentation
 
Sharepoint development 2013 course content | sharepoint 2013 course content
Sharepoint development 2013 course content | sharepoint  2013 course contentSharepoint development 2013 course content | sharepoint  2013 course content
Sharepoint development 2013 course content | sharepoint 2013 course content
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government Developers
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
How browsers work landscape
How browsers work landscapeHow browsers work landscape
How browsers work landscape
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
Lit there be light
Lit there be lightLit there be light
Lit there be light
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
micro-frontends-with-vuejs
micro-frontends-with-vuejsmicro-frontends-with-vuejs
micro-frontends-with-vuejs
 
Rendering engine
Rendering engineRendering engine
Rendering engine
 
Oshyn Best Practices For Sitecore CMS
Oshyn Best Practices For Sitecore CMSOshyn Best Practices For Sitecore CMS
Oshyn Best Practices For Sitecore CMS
 
Oshyn - Best Practices For Sitecore CMS
Oshyn - Best Practices For Sitecore CMSOshyn - Best Practices For Sitecore CMS
Oshyn - Best Practices For Sitecore CMS
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers work
 

Plus de NAVER D2

Plus de NAVER D2 (20)

[211] 인공지능이 인공지능 챗봇을 만든다
[211] 인공지능이 인공지능 챗봇을 만든다[211] 인공지능이 인공지능 챗봇을 만든다
[211] 인공지능이 인공지능 챗봇을 만든다
 
[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...
[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...
[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...
 
[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기[215] Druid로 쉽고 빠르게 데이터 분석하기
[215] Druid로 쉽고 빠르게 데이터 분석하기
 
[245]Papago Internals: 모델분석과 응용기술 개발
[245]Papago Internals: 모델분석과 응용기술 개발[245]Papago Internals: 모델분석과 응용기술 개발
[245]Papago Internals: 모델분석과 응용기술 개발
 
[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈
[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈
[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈
 
[235]Wikipedia-scale Q&A
[235]Wikipedia-scale Q&A[235]Wikipedia-scale Q&A
[235]Wikipedia-scale Q&A
 
[244]로봇이 현실 세계에 대해 학습하도록 만들기
[244]로봇이 현실 세계에 대해 학습하도록 만들기[244]로봇이 현실 세계에 대해 학습하도록 만들기
[244]로봇이 현실 세계에 대해 학습하도록 만들기
 
[243] Deep Learning to help student’s Deep Learning
[243] Deep Learning to help student’s Deep Learning[243] Deep Learning to help student’s Deep Learning
[243] Deep Learning to help student’s Deep Learning
 
[234]Fast & Accurate Data Annotation Pipeline for AI applications
[234]Fast & Accurate Data Annotation Pipeline for AI applications[234]Fast & Accurate Data Annotation Pipeline for AI applications
[234]Fast & Accurate Data Annotation Pipeline for AI applications
 
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load BalancingOld version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
 
[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지
[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지
[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지
 
[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기
[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기
[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기
 
[224]네이버 검색과 개인화
[224]네이버 검색과 개인화[224]네이버 검색과 개인화
[224]네이버 검색과 개인화
 
[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)
[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)
[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)
 
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
 
[213] Fashion Visual Search
[213] Fashion Visual Search[213] Fashion Visual Search
[213] Fashion Visual Search
 
[232] TensorRT를 활용한 딥러닝 Inference 최적화
[232] TensorRT를 활용한 딥러닝 Inference 최적화[232] TensorRT를 활용한 딥러닝 Inference 최적화
[232] TensorRT를 활용한 딥러닝 Inference 최적화
 
[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지
[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지
[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지
 
[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터
[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터
[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터
 
[223]기계독해 QA: 검색인가, NLP인가?
[223]기계독해 QA: 검색인가, NLP인가?[223]기계독해 QA: 검색인가, NLP인가?
[223]기계독해 QA: 검색인가, NLP인가?
 

Dernier

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

[D2 오픈세미나]2.browser engine 이형욱_20140523

  • 1. 웹브라우저 엔진의 구조와 원리 ( Understanding Open Source Rendering Engine ) 이형욱 (hyungwook.lee@navercorp.com) 시스템스컴퓨팅G / NAVER LABS 2014-05
  • 2. 2 0. Contents Chapter 1: How browsers work ① Browser at High Level ② Major Browser’s Rendering Engine ③ Summary of browser main flows. ④ HTML Parser ⑤ Render Tree ⑥ Layout ⑦ Paint Chapter 2: Advanced Rendering Technology ① Types of rendering path ② Software Rendering Path ③ Hardware Rendering Path ④ Threaded Compositor ⑤ Threaded Rasterization Chapter 3: How to improve rendering performance ① Understanding Dev Tools ② CSS properties by style operation required ③ Use layers to improve performance ④ Layers in WebKit ⑤ Cost of multi layers ⑥ Paul’s Guideline for Animation
  • 3. 3 Chapter 1, How browsers work
  • 4. 4 1. Browser at High Level CodeCoverage 10% 90% UI Browser Engine Rendering Engine Network I/O JavaScript Engine Graphics Stack DataPersistence
  • 5. 5 2. Major Browser’s Rendering Engine
  • 6. 6 <html> <head> <title> NAVER </title> </head> <body> <div> <h1> Hello </h1> <p> World </p> </div> </body> </html> 3. Summary of browser main flows.
  • 7. 7 DOM: Document Object Model - Document = HTML, well-formed XML - Object Model = Data + Method Standard way for accessing and manipulating documents. + 4. HTML Parser (1/2): DOM
  • 8. 8 HEAD TITLE NAVER BODY DIV H1 P HTML Hello World <html> <head> <title> NAVER </title> </head> <body> <div> <h1> Hello </h1> <p> World </p> </div> </body> </html> 4. HTML Parser (2/2): Example
  • 9. 9 5. Render Tree (1/4): CSS Box model html, address, blockquote, body, dd, div, dl, dt, fieldset, form, frame, frameset, h1, h2, h3, h4, h5, h6, noframes, ol, p, ul, center, dir, hr, menu, pre { display: block;} * Default display property: inline Default style sheet for HTML 4 The way the box is layed out is determined by  Box type: inline, block  Box dimensions: width, height  Positioning scheme: static, absolute, fixed, relative  External information: image size / view port size
  • 10. 10 5. Render Tree (2/4): Visual formatting Model < Relative Positioning >< Normal Flow > < Block formatting context > < Inline formatting context >
  • 12. 12 HEAD TITLE NAVER BODY DIV H1 P HTML Hello World Block Block Block Block Block Inline Inline 5. Render Tree (4/4): Example
  • 13. 13 6. Layout (1/2): Algorithm Overview 1. CSS 2.1 Visual formatting Model. 1) Normal Flow ① Block formatting contexts ② Inline formatting contexts ③ Relative positioning 2) Floats 3) Absolute positioning 2. Global and incremental layout 3. Dirty bit system 4. Asynchronous and Synchronous layout dirty < Incremental layout >
  • 14. 14 6. Layout (2/2): Example HEAD TITLE NAVER BODY DIV H1 P HTML Hello World Block Block Block Block Block Inline Inline (0, 0, 1024, 768) (0, 0, 1024, 768) (0, 0, 1024, 55) (10, 20, 1024, 37) (10, 80, 1024, 18)
  • 15. 15 7. Paint Block (html) Block (body) Block (div) Block (h1) Block (p) Inline (hello) Inline (world) (0, 0, 1024, 768) (0, 0, 1024, 768) (0, 0, 1024, 55) (10, 20, 1024, 37) (10, 80, 1024, 18) 1024 768<div>
  • 16. 16 Chapter 2, Advanced Rendering Technology
  • 17. 17 1. Non-composited SW rendering (Traditional) 2. Composited SW rendering 3. Composited GPU rendering 1. Types of rendering path
  • 18. 18 2. Rendering Path : Software Rendering Path 1. Renderer Process에서 skia를 이용하여 bitmap을 생성 (필요 시 compositing) 2. Shared Memory를 이용하여 Browser Process에 전달하여 화면에 Update.
  • 19. 19 2. Rendering Path : Hardware Rendering Path 1. 각 Layer 별 bitmap을 생성 (Render Layer traversing) 2. Textures upload into Video memory 3. Compositor에서 Layer 순서에 맞게 Texture를 drawing하여 화면에 Update
  • 24. 24 Chapter 3, How to improve rendering performance
  • 27. 27 3. Use layers to improve performance < Multi layer mode using translate3d> < Single layer mode>
  • 28. 28 4. Layers in WebKit 1. It's the root object for the page. <html> 2. CSS position properties (relative, absolute or a transform) 3. It is transparent 4. Has overflow, an alpha mask or reflection 5. Has a CSS filter 6. <canvas> 7. <video>
  • 29. 29 • Compositing 처리시 필요한 Memory 사용량 및 작업량 증가 5. Cost of multi layers <Layer를 너무 많이 사용할 경우 Compositing 시간이 오래 걸림>
  • 30. 30 1. Use “opacity, translate, rotate and scale” 2. Use reqeustAnimateFrame. Avoid setTimeout, setInterval 3. Use Browser Optimized CSS animation. Avoid Jquery animate() 6. Paul’s Guideline for Animation < Paul Irish >
  • 31. 31
  • 33. 33 Appendix #2: References 1. http://www.w3.org/TR/CSS2/ 2. http://www.w3.org/TR/DOM-Level-2-Core/core.html 3. http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/ 4. http://deview.kr/2013/detail.nhn?topicSeq=5 5. http://www.slideshare.net/joone/hardware-acceleration-in-webkit 6. http://dev.chromium.org/developers/design-documents/multi-process-architecture 7. http://dev.chromium.org/developers/design-documents/displaying-a-web-page-in- chrome 8. http://dev.chromium.org/developers/design-documents/inter-process-communication 9. http://dev.chromium.org/developers/design-documents/multi-process-resource- loading 10. http://dev.chromium.org/developers/design-documents/gpu-accelerated- compositing-in-chrome 11. http://dev.chromium.org/developers/design-documents/compositor-thread- architecture 12. http://dev.chromium.org/developers/design-documents/impl-side-painting