Android -- Object Creation/Memory Allocation vs. Performance -
This is probably one of the simplest of my current projects which has about 20 textages / images, which I have access to:
(TextView) multiLayout.findViewById (R.id.GameBoard_Multi_Answer1_Text)) setText (""); // or ((ImageView) multiLayout.findViewById (R.id.GameBoard_Multi_Answer1_Right)). Set visibility (see. INVISIBLE);
My question is, am I better off than a demonstration point of view, just tell these object variables? Also, am I continuing to lose some performance for the "search" process which goes as part of the FindViewById (...) method? (Ie does ViviIB (...) use to look for some kind of hashtable / hashap, or does it apply the repeated search on the hierarchy?)
Currently, my program is 2.5 Does never use more MB RAM, will it affect 20 or more object variables extraordinary? I do not think so, but I thought I would ask.
Thank you.
Yes, it would be right to cache the contexts of the view ListView
'S tag / holder
is about that for performance reasons.
Comments
Post a Comment