Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Google I/O 2023 - Debugging Jetpack Composeについて
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Shun Miyazaki
June 08, 2023
Technology
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Google I/O 2023 - Debugging Jetpack Composeについて
Google I/O 2023 に行われたセッション「Debugging Jetpack Compose」の内容 / 感想をまとめたものです。
Shun Miyazaki
June 08, 2023
More Decks by Shun Miyazaki
See All by Shun Miyazaki
DroidKaigi2025アプリのスクリーンショットテストが失敗していた原因を調べてみた
shunm
0
270
DroidKaigi アプリに初コントリビュートしました
shunm
0
120
Kotlinで簡単なDSLを作ってみる
shunm
0
80
Google I/O 2024 - Gemeni API on Androidの解説
shunm
0
980
Jetpack Compose で SharedElementTransitionっぽい挙動をやってみる
shunm
0
210
Other Decks in Technology
See All in Technology
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
会社説明資料
persolserverworks
0
9.8k
Metadata - Section 1: HTML Basics
mohab1
0
120
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
200
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.2k
USB PDを使ってスマホを労わりたい
raspython3
0
180
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
110
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
570
Featured
See All Featured
Building an army of robots
kneath
307
47k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Optimising Largest Contentful Paint
csswizardry
37
4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
WCS-LA-2024
lcolladotor
0
890
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
A better future with KSS
kneath
240
18k
Transcript
Google I/O 2023 Debugging Jetpack Compose について 宮﨑 瞬
本発表について 本発表は以下のセッション内容から、 個人的に気になった点をまとめたものです。 Debugging Jetpack Compose - Youtube h6ps://youtu.be/Kp-aiSU8qCU
セッション内容 Jetpack Composeの開発で、遭遇する問題の解決方法について、 解説してくれている。 Common Issues(⭐が本発表で話すところ) ・ Why is this
composable recomposing? ⭐ ・Problem: Frequent Recomposition ・How do I know what's wrong with my UI on different form factors? ・Why am I seeing Jank? ・Where should I focus on optimising?
Why is this composable recomposing? なぜ、このcomposableで、recomposeが実⾏されるのか?
Recomposeには3種類ある 1.Direct recomposition 変更された変数を参照しているComposeの、Recomposeが⾛る 2.Indirect recomposition 変更された変数を直接参照していないが、 変更された変数を、計算に使⽤している変数を参照しているComposableのRecomposeが⾛る 3.Unskippable recomposition
変更されていないが、 Unstableで、immutable(不変)であることを担保できないため、Recomposeが⾛る
Direct recomposition countが変更されると、TextのRecomposeが⾛る Debugging Jetpack Compose - Youtube https://youtu.be/Kp-aiSU8qCU
Indirect recomposition countが変更されると、 doubledが変更されて、MyTextのRecomposeが⾛る Debugging Jetpack Compose - Youtube h6ps://youtu.be/Kp-aiSU8qCU
Unskippable recomposition countが変更されると、listは値が変わっていないが、 Unstableなので、MyListのRecomposeが⾛る Debugging Jetpack Compose - Youtube h6ps://youtu.be/Kp-aiSU8qCU
Recomposeが 実⾏された理由をどうやって 確かめるか?
Compose state information in debugger Android Studio Hedgehogから、 Compose state
information in debuggerが使える h<ps://developer.android.com/studio/preview/features#compose- state-in-debugger Debugging Jetpack Compose - Youtube https://youtu.be/Kp-aiSU8qCU 検査したいところに、 breakpointを設置して、debugする。 Debuggerで、Recompositon Stateを見ることができる。
Debuggerで検証できるもの Changed State ・Unchanged - 変数は変更されていない ・Changed - 変数は変更された ・Uncertain
- 変数が変更されたかどうか、まだ評価中 ・Static - 変数は絶対に変更されない ・Unstable - 変数はunstable type(不変性が担保できない)
使⽤例1 isFollewedが変更されたので、Recomposeが実⾏ Debugging Jetpack Compose - Youtube https://youtu.be/Kp-aiSU8qCU
使⽤例2 podcastsがUnstableなので、Recomposeが実⾏ Debugging Jetpack Compose - Youtube h6ps://youtu.be/Kp-aiSU8qCU
まとめ ・Recomposeには3種類ある ・Android Studio Hedgehogで追加された、Compose state information in debuggerで、Recomposeの原因を検証できる