You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
I am using the advanced developer option that flashes the view that is drawn with a red overlay. This option is different from the one that flashes the whole screen when a view updates, so no mistake was made.
My issue is that that the whole screen gets redrawn when the image updates, creating high green bars when using the "Profile HWUI" option. This only happens when a placeholder is used such that the images switch pretty fast. If I disable the placeholder and the image clearing and I apply a custom loader that only sets the image view drawable, then only the image view gets redrawn.
My context is that I am trying to improve the performance of a really old and slow Android device that is drastically affected by image loading. Profiling it with the HWUI tool showed huge improvements when the placeholder is disabled such that only the image is redrawn, as the green lines stay down.
Implementation notes:
Using Glide's standard loader ".into(imageView)" always triggers a full screen redraw.
Using a custom loader that only sets the image drawable like in the attached gist fixes this issue, but only under the condition that no placeholders and no image clearing is being used.
With NO placeholder and NO target clearing + custom view loader:
Screen.Recording.2024-11-15.at.09.23.33.mov
Performance comparison (Watch the green bars):
Whole screen redraw:
Single image redraw:
UPDATE:
I commented out the placeholders both in the glide load request and in the custom loader. To achieve the placeholder effect I did two loads: One with a transparent drawable and one with an actual image and I achieved limited image view redraw. So, it seems like there's an issue with the Glide placeholder:
Screen.Recording.2024-11-15.at.09.52.58.mov
The text was updated successfully, but these errors were encountered:
Issue:
I am using the advanced developer option that flashes the view that is drawn with a red overlay. This option is different from the one that flashes the whole screen when a view updates, so no mistake was made.
My issue is that that the whole screen gets redrawn when the image updates, creating high green bars when using the "Profile HWUI" option. This only happens when a placeholder is used such that the images switch pretty fast. If I disable the placeholder and the image clearing and I apply a custom loader that only sets the image view drawable, then only the image view gets redrawn.
My context is that I am trying to improve the performance of a really old and slow Android device that is drastically affected by image loading. Profiling it with the HWUI tool showed huge improvements when the placeholder is disabled such that only the image is redrawn, as the green lines stay down.
Implementation notes:
Glide Version: com.github.bumptech.glide:glide:4.16.0
Code Gist: https://gist.github.com/domutadarius/98021d5e44b9ef02dddd2e796e60bc5b
With Placeholder and target clearing:
Screen.Recording.2024-11-15.at.09.18.08.mov
With NO placeholder and NO target clearing + custom view loader:
Screen.Recording.2024-11-15.at.09.23.33.mov
Performance comparison (Watch the green bars):
Whole screen redraw:
Single image redraw:
UPDATE:
I commented out the placeholders both in the glide load request and in the custom loader. To achieve the placeholder effect I did two loads: One with a transparent drawable and one with an actual image and I achieved limited image view redraw. So, it seems like there's an issue with the Glide placeholder:
Screen.Recording.2024-11-15.at.09.52.58.mov
The text was updated successfully, but these errors were encountered: