Glide: Bitmap prepareToDraw() performance optimization

Created on 19 May 2017  路  1Comment  路  Source: bumptech/glide

I noticed that master is using Bitmap.prepareToDraw(). Can you explain how this is being used, and a workaround for using it in an older version? I'm profiling my app right now and noticing in the GPU profiler consistently high sync/upload segments. The Android docs suggest using Bitmap.prepareToDraw() to help mitigate the issue. Specifically I'm looking to improve the scroll performance of my app.

question

Most helpful comment

You can probably add a call to prepareToDraw by subclassing or wrapping the existing Bitmap decoder in v3.

It basically just starts uploading the texture a little bit earlier. If you're seeing consistently high upload segments you're probably equally or better served by decreasing the size of the bitmaps you're loading, especially if you're loading a lot at once (in a list or a grid).

>All comments

You can probably add a call to prepareToDraw by subclassing or wrapping the existing Bitmap decoder in v3.

It basically just starts uploading the texture a little bit earlier. If you're seeing consistently high upload segments you're probably equally or better served by decreasing the size of the bitmaps you're loading, especially if you're loading a lot at once (in a list or a grid).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ersen-osman picture ersen-osman  路  3Comments

Morteza-Rastgoo picture Morteza-Rastgoo  路  3Comments

MrFuFuFu picture MrFuFuFu  路  3Comments

Tryking picture Tryking  路  3Comments

sergeyfitis picture sergeyfitis  路  3Comments