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
Glide cache pettern
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
FujiKinaga
November 06, 2017
Technology
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Glide cache pettern
v3とv4で比較してみた
FujiKinaga
November 06, 2017
More Decks by FujiKinaga
See All by FujiKinaga
Flutterで実装する実践的な攻撃対策とセキュリティ向上
fujikinaga
2
1.4k
最新のCompose Multiplatform を使うとiOSとAndroidアプリはどれくらい作れるのか
fujikinaga
2
720
Androidのテストの理解を深めてみた
fujikinaga
0
74
開発案件の進み方
fujikinaga
0
120
深いい勉強会 vol.10
fujikinaga
0
110
深いい勉強会 vol.9
fujikinaga
0
120
Understanding Dagger2 Part1
fujikinaga
0
75
Mater of Subscription
fujikinaga
0
88
深いい勉強会
fujikinaga
2
89
Other Decks in Technology
See All in Technology
人とエージェントが高め合う協業設計
kintotechdev
0
710
ここは地獄!つらい朝会を体験することで、チームとしてのより良い振る舞いに気づくワークショップ / The stand-up meeting from hell in the game industry
scrummasudar
0
210
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
720
プロダクト開発組織の現在地(Ver.2026/07) / product-organization
kaonavi
0
320
「顧客の声を聞かなければ何も始まらない」 ── 顧客の声から生まれた『AI返信補助機能』の開発プロセス / AICon2026_shikata_imai
rakus_dev
0
260
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
920
インフラと開発の垣根を超えていき!〜元AWSインフラエンジニアがAWS開発で奮闘している話〜
hatahata021
3
390
全社でのソフトウェアサプライチェーン攻撃対策をやってみた with Takumi Guard
z63d
0
230
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
270
Kaggleで成長するために意識したこと
prgckwb
2
440
【公開用】AI_Dev_Ex2026_AI_登壇資料
matsuritechnologies
PRO
1
450
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
1k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
660
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
It's Worth the Effort
3n
188
29k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Discover your Explorer Soul
emna__ayadi
2
1.2k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
410
Embracing the Ebb and Flow
colly
88
5.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Transcript
Glide Cache Difference between v3 and v4
User action pattern
Seattle : v3
None
ProfilePic in Feed CollabIcon in Player BG with blur in
Player ProfilePic in Player
Stockholm : v3
None
ProfilePic in Player BG with blur in Player NotificationIcon CollabIcon
in Player CommentPic in Player ProfilePic in Feed
When reopen
What’s changed?
- ProfilePic in Feed int scaledPix = AppUtils.dpToPx(128, contactViewHolder.mImgProfilePic.getResources()); Glide.with(contactViewHolder.mImgProfilePic.getContext())
.load(AppUtils.getFeedProfilePicUrl(feed)) .override(scaledPix, scaledPix) .placeholder(R.drawable.ic_feed_placeholder) .into(contactViewHolder.mImgProfilePic); - ProfilePic in Player int scaledPixImgRound = getResources().getDimensionPixelSize(R.dimen.player_user_image_size); ← 100dp Glide.with(getContext()) .load(AppUtils.getFeedProfilePicUrl(feed)) .bitmapTransform(new CropCircleTransformation(getContext())) .override(scaledPixImgRound, scaledPixImgRound) .into(mUserImg); - CollaborationIcon in Feed int scaledPix = AppUtils.dpToPx(32, NanaApplication.getContext().getResources()); Glide.with(NanaApplication.getContext()) .load(url) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .into(new BitmapImageViewTarget(contactViewHolder.mLstCollabImages.get(currentIndex)) { @Override protected void setResource(Bitmap resource) { if (contactViewHolder.mLstCollabImages != null && contactViewHolder.mLstCollabImages.get(currentIndex) != null) { RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(contactViewHolder.mLstCollabImages.get(currentIndex).getResources(), resource); circularBitmapDrawable.setCircular(true); - CollaborationIcon in Player int scaleRatioCollab = getResources().getDimensionPixelSize(R.dimen.player_collab_user_size); ← 36dp Glide.with(getContext()) .load(picUrl) .bitmapTransform(new CropCircleTransformation(getContext())) .override(scaleRatioCollab, scaleRatioCollab) .into(mCollabImage);
- ProfilePic in Feed int scaledPix = AppUtils.dpToPx(128, contactViewHolder.mImgProfilePic.getResources()); Glide.with(contactViewHolder.mImgProfilePic.getContext())
.load(AppUtils.getFeedProfilePicUrl(feed)) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() - ProfilePic in Player int scaledPix = AppUtils.dpToPx(128, getResources()); Glide.with(getContext()) .load(description.getIconUri().toString()) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(getContext())) .into(mUserImg); - CollaborationIcon in Feed int scaledPix = AppUtils.dpToPx(48, contactViewHolder.mLstCollabImages.get(currentIndex).getResources()); Glide.with(contactViewHolder.mLstCollabImages.get(currentIndex).getContext()) .load(url) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(contactViewHolder.mLstCollabImages.get(currentIndex).getContext())) - CollaborationIcon in Player int scaledPix = AppUtils.dpToPx(48, getResources()); Glide.with(getContext()) .load(picUrl) .asBitmap() .override(scaledPix, scaledPix) .centerCrop() .transform(new CropCircleTransformation(getContext()))
Notice • Cache format (Drawable, Bitmap, Gif…) • Load url
• .override (int width, int height) • .transform (Blur, Brightness, Color, Circle…) • DiskCacheStrategy
??? : v4
RESOURCE : v4
Change diskCacheStrategy easily!!! ~In NanaGlideModule.class~ builder.setDefaultRequestOptions( new RequestOptions() .format(DecodeFormat.PREFER_RGB_565) .diskCacheStrategy(DiskCacheStrategy.RESOURCE));
Same with Seattle : v3
AUTOMATIC : v4
AUTOMATIC is default setting in v4 builder.setDefaultRequestOptions( new RequestOptions() .format(DecodeFormat.PREFER_RGB_565)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC));
Perfectly reuse
Reference • https://qiita.com/ronnnnn/items/ 9d82130985b5f1f6b77e • https://qiita.com/ryugoo/items/ df3ff453897379cc1bd0