Currently in the initialize of RemoteImageView if "sharedImageLoader" is null then a new instance of RemoteImageLoader is created. This will call "enableDiskCache" which in turn calls "sanatizeDiskCache", which is a costly method.
In the getView of the RemoteImageGalleryAdapter, if convertView is null then a new instance of RemoteImageView is created, which following the flow of the above paragraph will call "sanatizeDiskCache".
This means that"sanatizeDiskCache" will be called frequently when scrolling through a gallery, and will really takes a lot of cpu time and can causes the frame rate to really slow down.
A simple work around is to set a "sharedImageLoader", stopping new instances of "RemoteImageLoader" and preventing the "sanatizeDiskCache" calls. This is an easy step, but one that was not obvious to me when setting up my gallery, and so i would presume that it would not be obvious to others doing the same.
Currently in the initialize of RemoteImageView if "sharedImageLoader" is null then a new instance of RemoteImageLoader is created. This will call "enableDiskCache" which in turn calls "sanatizeDiskCache", which is a costly method.
In the getView of the RemoteImageGalleryAdapter, if convertView is null then a new instance of RemoteImageView is created, which following the flow of the above paragraph will call "sanatizeDiskCache".
This means that"sanatizeDiskCache" will be called frequently when scrolling through a gallery, and will really takes a lot of cpu time and can causes the frame rate to really slow down.
A simple work around is to set a "sharedImageLoader", stopping new instances of "RemoteImageLoader" and preventing the "sanatizeDiskCache" calls. This is an easy step, but one that was not obvious to me when setting up my gallery, and so i would presume that it would not be obvious to others doing the same.