Does it help perf/memory pressure to use an image loader on local resources/icons in Android? -
i use image loading library (picasso) image loading/display remote images, , works well. however, local resources (mostly smaller image icons) i've been putting image directly in xml (via src="@drawable/image_name").
should using picasso (or glide, etc) load these smaller local images? if so, should both lists (shown via recyclerview) , 1 off icons? loading these local resources w/o loader working, improve perf if possible.
thanks!
standard practice local density specific resources included apk load them via resources, either including them src or background in xml or using resources#getdrawable().
usually image loading library unnecessary local resources because local resources tend small, fast decode , in memory in resources cache managed android.
that said, if think have performance problem, measure! if looks particular image heavy activity or fragment slow start because of layout inflation time, may want experiment using image loading library resources. using image loading library appropriate if you're loading raw resources, or resources aren't split density.
Comments
Post a Comment