ls02 wrote: > So if there are 7-8 or more items visisble at the same time > and each item can be updated every half second or so, I cannot each > time walk through all visible items i nthe list to find the one that > needs to be updated. This chokes all UI responsiveness and puts a lot > of pressure on CPU taking into account this is Java, not binary > compiled code.
Iteration will take far less than a millisecond. A for loop is measured on the order of instructions, not thousands of instructions. Checking to see if a row is the one you want (e.g., via getTag()) will take another handful of instructions. Hence, I really rather doubt the iteration is the source of whatever difficulty it is that you are having. You are welcome to put more smarts in your custom Adapter to try to improve performance (e.g., maintain a HashMap of keys to rows). However, if you screw that up, you will create a memory leak that will hammer your performance worse than simply iterating. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.5 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

