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
Strong Skipping Modeをはじめよう
Search
Tomoki Yamashita
February 07, 2024
Technology
5.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Strong Skipping Modeをはじめよう
Tomoki Yamashita
February 07, 2024
More Decks by Tomoki Yamashita
See All by Tomoki Yamashita
ハードウェア連携が必要なプロダクトにおける自動テストの書き方
tomorrowkey
0
130
STORES_決済端末2ってAndroidなんでしょ__ほんとうかな__.pdf
tomorrowkey
0
63
モバイルとRubyとわたし
tomorrowkey
0
69
BiDiってなんだ?
tomorrowkey
2
750
文字列操作の達人になる ~ Kotlinの文字列の便利な世界 ~ - Kotlin fest 2025
tomorrowkey
2
1.7k
Ebisu mobile #11 - Predictive Backに対応する
tomorrowkey
1
160
AI協同時代にモバイルエンジニアが備えるべき開発環境の話
tomorrowkey
2
450
5分で完全理解するNav3との向き合い方
tomorrowkey
0
270
テストを楽に書きたい
tomorrowkey
2
440
Other Decks in Technology
See All in Technology
WEBフロントエンド研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
690
ここは地獄!つらい朝会を体験することで、チームとしてのより良い振る舞いに気づくワークショップ / The stand-up meeting from hell in the game industry
scrummasudar
0
410
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
120
害獣害虫を自動判別! ペストコントロール支援ビジネス成功のヒント【SORACOM Discovery 2026】
soracom
PRO
0
120
オートマトンと字句解析でRoslynを読む
tomokusaba
0
120
AIエージェントがあれば技術書なんてすぐ書けるでしょ→無理でした
watany
6
1.1k
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
150
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
420
なぜMIXIはゼロトラスト基盤として クラウドフレアを選んだのか - Cloudflare Peer Point SASE User Voices
mixi_engineers
PRO
2
130
DevOps Agentで運用判断をチーム資産にする~Agent InstructionsとAgent Skillを継続的に育てる~
fujioka6789
0
170
AI時代におけるテストの基礎の再定義 / Rethinking the Fundamentals of Testing in the AI Era
mineo_matsuya
15
6.1k
人とエージェントが高め合う協業設計
kintotechdev
0
1.1k
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
160
RailsConf 2023
tenderlove
30
1.5k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
330
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
A better future with KSS
kneath
240
18k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Design in an AI World
tapps
1
270
Visualization
eitanlees
152
17k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Transcript
STORES 株式会社 Strong Skipping Modeをはじめよう potatotips #86 2024.02.07 @tomorrowkey
自己紹介
自己紹介 • 山下智樹 / @tomorrowkey • STORES株式会社 - STORES ブランドアプリ
• Android エンジニア (14年生) 3
STORESブランドアプリって? 4
Strong Skipping Modeとはなんだ
Strong Skipping Modeとはなんだ 6 https://android-developers.googleblog.com/2024/01/whats-new-in-jetpack-compose-january-24-release.html
Strong Skipping Modeとはなんだ 7 https://android-developers.googleblog.com/2024/01/whats-new-in-jetpack-compose-january-24-release.html
Strong Skipping Modeとはなんだ 8 https://android-developers.googleblog.com/2024/01/whats-new-in-jetpack-compose-january-24-release.html
Strong Skipping Modeとはなんだ まじじゃん… 9 https://android-review.googlesource .com/c/platform/frameworks/support /+/2694106
おさらい
そもそもSkippingってなに - ステート変更のたびに画面全体を再描画(Recompose)しているとパフォー マンスが悪い - Composableの引数が安定(Stable)していたら、そのComposableは Skippableとしてマークし、引数が同じ場合にRecomposeを回避できる 11
Stableってなに - 安定している型のこと - Stable - Int, Boolean, String …
- Array - イミュータブル(val)で宣言されている安定したプロパティで構成されたオブジェクト - Unstable - List, Date… - ミュータブル(var)で宣言されているプロパティを持つオブジェクト 12
Strong Skipping Modeはようするに - 不安定な引数型であってもSkippableとしてマークする - これまでよりもSkippableになるComposableが増えるからパフォーマンスが あがる 注: non-restartableなComposableは引き続きSkippableではない扱いとなりま
す。 13
Strong Skipping Modeをためす
Strong Skipping Modeをためす - Kotlin 1.9.20 - Compose Compiler: 1.5.4
- Compose BOM: 2024.01.00 - Compose 1.6.0 (w/ compiler option) 15 android { kotlinOptions { freeCompilerArgs = listOf( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true" , ) } }
動作確認: Strong Skipping Mode: 無効
動作確認: Strong Skipping Mode: 有効
Strong Skipping Modeとむきあう
Strong Skipping Modeとむきあう - Compose 1.7でデフォルト有効になる - SkippableにしたくないComposableには@Unskippableアノテーションをつ ければOK -
サンプルコードなら単純だから動作確認も簡単だけど、プロダクションコード を確認するのは大変… 19
Strong Skipping Modeとむきあう Compose Compiler Metrics - Compose CompilerがComposableをどう認識 しているかレポートしてくれる
- Strong Skipping Modeの導入前後でどう変化 するか観察することで、動作確認すべき Composableを絞ることができる 20 https://github.com/androidx/androidx/blob/androidx-m ain/compose/compiler/design/compiler-metrics.md
Strong Skipping Modeとむきあう プロダクションコードでメトリクスを比較してみた 21 --- ./compose_metrics-before/module.json 2024-02-03 20:12:57 +++
./compose_metrics-after/module.json 2024-02-03 20:10:20 @@ -1,10 +1,10 @@ { - "skippableComposables": 279, + "skippableComposables": 306, "restartableComposables": 430, "readonlyComposables": 5, "totalComposables": 449, "restartGroups": 430, - "totalGroups": 665, + "totalGroups": 668, "staticArguments": 890, "certainArguments": 413, "knownStableArguments": 6700, \ No newline at end of file @@ -17,9 +17,9 @@ "inferredUncertainClasses": 28, "effectivelyStableClasses": 427, "totalClasses": 742, - "memoizedLambdas": 435, + "memoizedLambdas": 568, "singletonLambdas": 146, "singletonComposableLambdas": 32, "composableLambdas": 194, - "totalLambdas": 520 + "totalLambdas": 568 } \ No newline at end of file
おわり