I have a Cursor adapter where I potentially have a number of images in a grid setup.
When the bindView
method runs it needs to complete very quickly and therefore as part of a performance/efficiency boost I would like to compare the images before I make any changes(so I don't start running my Async Tasks etc multiple times). However, I can't store the entire byte[]
(e.g. in the ViewHolder) as this clearly eats through memory.
However, I was thinking I could take a part of an image byte array (20 characters or so) and compare it with what is currently in the ViewHolder and if different this could be verified.
Is this a viable option or is there a better way to do this? Secondly, what part of the byte[]
is going to produce the most unique set of characters?