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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mine2424
June 17, 2024
Programming
0
500
RepaintBoundary で Flutter のパフォーマンスを向上
mine2424
June 17, 2024
Tweet
Share
More Decks by mine2424
See All by mine2424
Android 16KBページサイズ対応をはじめからていねいに
mine2424
1
10k
アニメーションを最深まで理解してパフォーマンスを向上させる
mine2424
0
800
金融×キャリア教育で人生をシミュレーション
mine2424
0
130
実務2年目の学生がエンジニアとして働くことについて思ったこと
mine2424
0
140
Other Decks in Programming
See All in Programming
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
140
CSC307 Lecture 02
javiergs
PRO
1
780
React Native × React Router v7 API通信の共通化で考えるべきこと
suguruooki
0
100
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
CSC307 Lecture 06
javiergs
PRO
0
690
並行開発のためのコードレビュー
miyukiw
0
1.1k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
高速開発のためのコード整理術
sutetotanuki
1
410
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
87
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
The agentic SEO stack - context over prompts
schlessera
0
650
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
84
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Music & Morning Musume
bryan
47
7.1k
So, you think you're a good person
axbom
PRO
2
1.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
[SF Ruby Conf 2025] Rails X
palkan
1
760
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