android - using Set list adapter for +10000 rows -
if use setlistadapter show +10,000 rows, may problems occur?
if yes, please guide me choose better way show these rows.
thanks
listview can display any number of elements data; there trick when we're discussing large , large numbers: need re-use views listview holding. google io presentation best thing can recommend you.
now, there other things can think of have negative impact:
- how memory 10k object take? if it's sms collection, 10k * 160 max chars per message * 4 bytes per char give 6.4 million bytes ~6 mb. 6 mb not hold in memory it's not number can neglect.
- how fast accessible object in store? if hold data structure in memory , store
arraylistbelieve have instant access. or decide data structure use. seems me choosing right collection important. maybe this article you.
in end should consider how users use app. worth storing messages in memory since user want see latest ones, ones last week, or ones favorite contacts? maybe filtering option helpful have , way persist them in sqlite.
Comments
Post a Comment