Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a placeholder forces the whole screen to redraw when the placeholder is loaded. #2507

Open
domutadarius opened this issue Nov 15, 2024 · 0 comments

Comments

@domutadarius
Copy link

domutadarius commented Nov 15, 2024

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 the image is retrieved from the cache and no placeholder is required then only the image view is flashed by the red overlay. Also, if I disable the placeholder, 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.

Picasso Version: com.squareup.picasso:picasso:2.8

Code Gist: https://gist.github.com/domutadarius/7f7e884e78c38519fb065e4586cf53c6

Screen.Recording.2024-11-15.at.09.00.49.mov

Performance proof:

Full screen redraw:
Image

Limited, image only redraw:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant