Suresh Maidaragi
06/04/2024, 5:50 PMcoil
3.0.0-alpha06
seeing sudden spike in memory consumption around ~180MB,
in case of iOS platform when we try to get bitmap using coil3, the size of this image▾
@OptIn(ExperimentalCoilApi::class)
suspend fun getBitmap(url: String, context: PlatformContext): Bitmap? {
return coil3.ImageLoader.Builder(context).diskCachePolicy(CachePolicy.ENABLED).networkCachePolicy(CachePolicy.DISABLED).build().execute(coil3.request.ImageRequest.Builder(context).
data(url)
.build()).image?.toBitmap()
}
when we load image of size just in KB's it not giving memory consumption spike.Sergey Y.
06/04/2024, 7:46 PMSergey Y.
06/04/2024, 7:52 PMdiegopap
06/04/2024, 8:37 PMjw
06/04/2024, 11:36 PMSuresh Maidaragi
06/05/2024, 4:37 AMSuresh Maidaragi
06/05/2024, 6:55 AMJake Wharton [5:06 AM]
You also seem to be creating a new image loader for each image load. Do not do this. Make it once, and share itWe tried but still we see spike. This issue happens only on iOS. is something seiko doing in background.
Suresh Maidaragi
06/05/2024, 6:57 AMSergey Y.
06/05/2024, 8:18 AMSuresh Maidaragi
06/05/2024, 8:21 AMSergey Y.
06/05/2024, 8:23 AMSuresh Maidaragi
06/05/2024, 9:52 AMSuresh Maidaragi
06/05/2024, 9:54 AMSergey Y.
06/05/2024, 10:00 AMSuresh Maidaragi
06/05/2024, 10:08 AMSuresh Maidaragi
06/05/2024, 10:09 AMSergey Y.
06/05/2024, 10:10 AMSuresh Maidaragi
06/06/2024, 6:03 AMSergey Y.
06/06/2024, 11:55 AMSuresh Maidaragi
06/06/2024, 12:38 PM