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
Strong Skipping Modeをはじめよう
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tomoki Yamashita
February 07, 2024
Technology
5.8k
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
160
STORES_決済端末2ってAndroidなんでしょ__ほんとうかな__.pdf
tomorrowkey
0
83
モバイルとRubyとわたし
tomorrowkey
0
89
BiDiってなんだ?
tomorrowkey
2
820
文字列操作の達人になる ~ Kotlinの文字列の便利な世界 ~ - Kotlin fest 2025
tomorrowkey
2
2.1k
Ebisu mobile #11 - Predictive Backに対応する
tomorrowkey
1
180
AI協同時代にモバイルエンジニアが備えるべき開発環境の話
tomorrowkey
2
460
5分で完全理解するNav3との向き合い方
tomorrowkey
0
330
テストを楽に書きたい
tomorrowkey
2
460
Other Decks in Technology
See All in Technology
今から始めるAWS環境の暗号移行 - ポスト量子時代に備える
sato4mi
0
150
Copilot Coworkで「みのるん式」やってみた
minorun365
PRO
2
1.5k
AIコーディングはじめました
miso
0
150
慶應義塾大学 AI実践05 論文執筆の仕組み化
keio_smilab
PRO
6
3.6k
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
570
分析作業をどこまで任せるか自分で決められる AIネイティブBI『Golden Analytics』が 良さげな話 /golden-analytics-is-ai-native-bi
shinyaa31
0
110
あなたのDartコードは丸見えかもしれない ~reFlutterで暴くFlutterアプリの中身と多層防御~
zozotech
PRO
0
770
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
140
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
800
Consistency for mere mortals - A gentle guide to consistency
ufried
0
120
企画からFlutter実装まで、1つの機能を一貫して開発したプロセスと成果物
khiroyuki1003
1
150
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
170
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Visualization
eitanlees
153
17k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
How to Ace a Technical Interview
jacobian
280
24k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
The untapped power of vector embeddings
frankvandijk
2
2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Into the Great Unknown - MozCon
thekraken
41
2.8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
240
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
360
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
おわり