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
RepaintBoundary で Flutter のパフォーマンスを向上
Search
mine2424
June 17, 2024
Programming
0
470
RepaintBoundary で Flutter のパフォーマンスを向上
mine2424
June 17, 2024
Tweet
Share
More Decks by mine2424
See All by mine2424
Android 16KBページサイズ対応をはじめからていねいに
mine2424
1
8.8k
アニメーションを最深まで理解してパフォーマンスを向上させる
mine2424
0
630
金融×キャリア教育で人生をシミュレーション
mine2424
0
120
実務2年目の学生がエンジニアとして働くことについて思ったこと
mine2424
0
130
Other Decks in Programming
See All in Programming
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
140
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
380
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
400
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
300
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
280
Inside of Swift Export
giginet
PRO
1
530
KoogではじめるAIエージェント開発
hiroaki404
1
420
エンジニアに事業やプロダクトを理解してもらうためにやってること
murabayashi
0
140
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
140
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
160
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
660
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
500
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Being A Developer After 40
akosma
91
590k
RailsConf 2023
tenderlove
30
1.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
660
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
310
Mobile First: as difficult as doing things right
swwweet
225
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
A Tale of Four Properties
chriscoyier
161
23k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Facilitating Awesome Meetings
lara
57
6.6k
Transcript
PUBLIC Flutter Meetup Tokyo #20 2024-06-17 RepaintBoundary で Flutter のパフォーマンスを向上
1
PUBLIC 自分を表す#(ハッシュタグ) みね (Ryota) # 奈良県出身 # ソフトテニス6年 # ポーカー1年
# F1 # 麻雀にはまり中 # 来年ポーカーの世界大会でます 経歴 大阪経済大学 経済学部卒 2024/4~ サイバーエージェント入社(24卒) X : nihon_kaizou github : mine2424 zenn: mine2424
PUBLIC RepaintBoundary とは? はみ出ている... 無駄なペンキ塗りが発生... 事前にテープを貼ろう!
PUBLIC RepaintBoundary とは? This widget creates a separate display list
for its child, which can improve performance if the subtree repaints at different times than the surrounding parts of the tree. 他と異なるタイミングで再描画される Widget を切り離す ex) animation, chart, CustomPaint, BackDropFilter etc… 頻繁に再描画されるもの
PUBLIC Deep Dive RepaintBoundary RenderObject とは? config, def state, lifecycle
painter
PUBLIC Deep Dive RepaintBoundary RenderObject.markNeedsPaint によって 描画が必要であるというフラグが立つ RenderObject.isRepaintBoundary を持つ一番近い祖先 である
RenderObject が再描画の対象となる (何も指定していないとアプリの root より子孫全てが再描画対象となる...) PaintingContext も同様
PUBLIC Deep Dive RepaintBoundary PaintingContext.paintChild() RenderObject.markNeedsPaint()
PUBLIC Deep Dive RepaintBoundary 実は Drawer にも RepaintBoundary が...! ref:
https://github.com/flutter/flutter/blob/5187cab7bdd434ca74abb45895d17e9fa553678a/packages/flutter/lib/src/material/drawer.dart#L690 DrawerControllerState
PUBLIC RepaintBoundary の使い所 Transform & ジャイロスコープ (sensors_plus)
PUBLIC RepaintBoundary の使い所
PUBLIC RepaintBoundary の使い所
PUBLIC RepaintBoundary の計測方法 Dev Tools の Flutter inspector より
PUBLIC RepaintBoundary の計測方法 main.dart にて 全ての RenderObject に対して timeline event
を生成 再描画箇所の 色が変わる!
PUBLIC まとめ • RepaintBoundary は異なるタイミングで再描画される widget と切り離すためにある • RenderObject 内で
どこで isRepaintBoundary が true に なっているかを見ている • debug によって直感的にも定量的にも使いどころが把握できる UI のパフォーマンスを向上させて 快適なアプリを構築!
PUBLIC END 15