Comments (3)
It's probably as much String.format as locking around Log, but it's still unfortunate. We use proguard to strip out Log.v and Log.d in our release builds of our apps, partly to solve this kind of problem:
-assumenosideeffects class android.util.Log {
public static int v(...);
}
-assumenosideeffects class android.util.Log {
public static int d(...);
}
-assumenosideeffects class android.util.Log {
public static int i(...);
}
If this is causing enough frames to drop that its super noticeable while developing, it may be best to do what you're suggesting and only turn on logging if explicitly requested. I'd assumed that the frame drop from all of the garbage collections caused by the first bit of scrolling (when we don't have any bitmaps to recycle) would overwhelm any side affects of logging, but maybe that's not a valid assumption.
I'll look in to adding some debug method to Glide to enable/disable logging.
from glide.
I noticed that after the images were on cache that the scrolling was very fast, even on a custom complicated layout.
But, from time to time the scrolling was really slow and sometimes it got almost 1s stop.
Setting DEBUG to false fixed and it makes some sense because we have a lot of small images and we could get between 10-20 logging images while flinging one full page of the ListView.
Thanks for the quick support!
from glide.
I couldn't think of a nicer way to implement this, so I used what you suggested: c29ca39
In the future I could see wanting to enable or disable some other types of debugging but this seems like a logical first step. Thanks for reporting the issue and providing a solution.
from glide.
Related Issues (20)
- Inconsistent Handling of @GlideModule Annotation Between KSP and KAPT
- Compose GlideImage, high aspect ratio image load will crash.
- Supporting behavior changes when TargetSDK 34
- GeneratedAppGlideModuleImpl generated by ksp 'isManifestParsingEnabled' is always false
- [Compose] Expose Glide loading status as an observable state.
- [Compose] GlideSubcomposition state is changing from Loading-Success-Loading
- Crash in version 4.8.0
- ANR in LruBitmapPool HOT 1
- GlideCompose can not load "android.resource://..."
- Is there a 16KB version of Glide for Android?
- Is there a 16KB version of Glide for Android?
- Download for build.gradle.kts is not specified
- Update http to https in HttpUrlFetcher
- Fatal Exception: java.lang.IllegalStateException Cannot recycle a resource while it is still acquired
- GlideCompose's contentScale cannot be previewed correctly. HOT 2
- How can a.tif sequence be played
- avif-integration need a 16KB version for Android HOT 2
- How to add glide to Android.bp?
- Unused parameter `restart` in method setVisible not allowing the Gif to restart smothly from the first frame.
- Fatal Exception: java.lang.IllegalStateException Cannot recycle a resource while it is still acquired
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glide.