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
85
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.6k
最新のCompose Multiplatform を使うとiOSとAndroidアプリはどれくらい作れるのか
fujikinaga
2
740
Androidのテストの理解を深めてみた
fujikinaga
0
82
開発案件の進み方
fujikinaga
0
130
深いい勉強会 vol.10
fujikinaga
0
120
深いい勉強会 vol.9
fujikinaga
0
130
Understanding Dagger2 Part1
fujikinaga
0
82
Mater of Subscription
fujikinaga
0
96
深いい勉強会
fujikinaga
2
100
Other Decks in Technology
See All in Technology
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
390
USB PDを使ってスマホを労わりたい
raspython3
0
160
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
160
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
150
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
1
460
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
300
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
390
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
860
転んだ話が背中を預ける理由になる / A_story_about_falling_down_gives_you_a_reason_to_watch_each_other_s_backs.pdf
pauli
3
360
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
170
AI時代のAPI開発を加速する品質ガードレール / API Quality Guardrails in the AI Era
yokawasa
0
190
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.7k
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Building the Perfect Custom Keyboard
takai
2
900
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Fireside Chat
paigeccino
43
4.1k
A Soul's Torment
seathinner
8
3.7k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Technical Leadership for Architectural Decision Making
baasie
3
600
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
A designer walks into a library…
pauljervisheath
211
25k
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