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
Glide cache pettern
Search
FujiKinaga
November 06, 2017
Technology
80
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.5k
最新のCompose Multiplatform を使うとiOSとAndroidアプリはどれくらい作れるのか
fujikinaga
2
730
Androidのテストの理解を深めてみた
fujikinaga
0
77
開発案件の進み方
fujikinaga
0
130
深いい勉強会 vol.10
fujikinaga
0
110
深いい勉強会 vol.9
fujikinaga
0
130
Understanding Dagger2 Part1
fujikinaga
0
80
Mater of Subscription
fujikinaga
0
92
深いい勉強会
fujikinaga
2
95
Other Decks in Technology
See All in Technology
SREの視点で考えるSIEM活用術 〜AWS環境でのセキュリティ強化〜
cscengineer
PRO
0
320
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
0
550
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.7k
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
300
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.7k
品質と信頼性を地続きにする
grimoh
2
980
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
Antigravity SDK for the Java Developer
glaforge
0
190
Harness Engineering on Rails
joelq
0
440
あけおめLINE 傾向とその対策
nasa9084
0
320
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
3k
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
300
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
310
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
730
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
RailsConf 2023
tenderlove
30
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
830
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
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