Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ブラウザレンダリングについて(簡易版)
Search
kab0718
November 29, 2023
0
62
ブラウザレンダリングについて(簡易版)
kab0718
November 29, 2023
Tweet
Share
More Decks by kab0718
See All by kab0718
visxに触ってみた話
kab0718
0
240
アルゴリズムと計算量
kab0718
0
47
お嬢様言葉
kab0718
0
130
アイドルとコミュニケーション
kab0718
0
29
コーディングで意識してること
kab0718
0
50
趣味とぷよぐらみんぐ
kab0718
0
220
SDLアプリコンテスト2019プレゼン資料
kab0718
0
57
近況報告
kab0718
0
1.3k
アイドル×アイドル
kab0718
0
150
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
140
Odyssey Design
rkendrick25
PRO
2
540
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
930
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
Transcript
ブラウザレンダリングについて
概要 • ブラウザがページ表示するまでの流れ • 知ることのメリット ◦ パフォーマンス改善の原因特定 初期描画だけでなく操作に対しての応答速度も含む ◦
web系やるとき知っておけば便利 • ブラウザがやってくれてることなので知らなくても ものは作れる
工程 Download Parse Scripting Calculate Style Layout Paint Rasterize Paint
Composite Layers Loading Rendering Painting Frame
Download Parse Scripting Calculate Style Layout Paint Rasterize Paint Composite
Layers Loading Frame Rendering Painting
Loading • Download ◦ htmlやcss、JavaScriptファイル、画像などの リソースをサーバーからダウンロードする • Parse ◦
html/cssをパース(構文解析)してレンダリング用の データ構造に変換 html → DOMツリー css → CSSOMツリー
Download Parse Scripting Calculate Style Layout Paint Rasterize Paint Composite
Layers Loading Frame Painting Rendering
Scripting • JavaScriptファイルの実行 • JavaScriptのコードを解析してコンパイルすることで 実行可能な形式に変換 • 解析も以下の二段階に分かれて実施している ◦
字句解析 ソースコードをトークンと呼ばれる単位に分割 ◦ 構文解析 トークンの配列から抽象構文木を作成
Download Parse Scripting Calculate Style Layout Paint Rasterize Paint Composite
Layers Loading Frame Painting Rendering
Rendering • Calculate Style ◦ DOMツリー内のすべての要素に対してどのcssプロパティが 当たるか計算 ◦ cssルールのcssセレクタがマッチするか総当たりで実施
• Layout ◦ レイアウト情報の計算とレイアウトを実施 ◦ レイアウト情報とは →要素の大きさ/margin/padding/位置/z軸の位置
Download Parse Scripting Calculate Style Layout Paint Rasterize Paint Composite
Layers Loading Frame Painting Rendering
Painting • Paint ◦ 内部の2Dグラフィックエンジン向けの命令を生成 • Rasterize ◦ 生成された命名を基にレイヤーと呼ばれる単位で
ピクセルへと描画 ◦ レイヤーはz軸の上下関係を持つ • Composite Layers ◦ レイヤーを合成してレンダリング結果を生成
最後に • 大分端折った内容になった • 右の本でこの辺もっと詳しく書いてるらしい →今買ったので未読 • パフォーマンス系の問題に当たった時に 軽く思い出してほしい
• 目に見える部分だけでなく 低レイヤーの理解も大事