performance - Listing million+ records in Android with multiple list ui items -
in 1 of our app, have list around million+ records stored in internal sqlite database , show them in list view separated multiple list view ui layouts.
for example, list :
area 1 location person 1 person 2 person 3 location b person 4 person 5 area 2 location c person 6 person 7 person 8 location d person 9 person 10
and on...
now, areas in hundreds, locations in thousands in number , persons in millions. area, location & person models (tables) multiple attributes attached them. i've utilize 3 different list item layout area, location & person records.
i've used endless adapter cwac custom baseadapter in implementation. i'm fetching , storing areas & locations in arraylist , i've delegated fetching of person records endless adapter. working expected number of records person(s) maintain growing (which normal in app), list view generation getting slow day-by-day. other there filters come play filter area, location & persons. each filter query fetching area, location person changes. , have search feature in app user can search particular area, location or person , list view refreshes info accordingly.
i'm not allowed show actual records , source code have helped in understanding complex info in improve way, sorry!
is there better way , improve user experience , save user's time? help much appreciated. in advance.
@squonk - users can edit records of persons @ given point in time changing location, names, birthdate, etc. users can alter location want pursue. example, user can store new york & london his/her preference if app has multiple other locations him/her choose. 1 time user selects location he/she able see persons available on locations.
@tophyr - endlessadapter helps me fetch 30 records @ time given area & location maintain in memory display. 1 time user scrolls , lastly record reached, endlessadapter refreshes , info in memory refreshes too. there no person records left, alter query next location , endlessadapter starts fetching person records based on new query.
@commonsware - yes, millions records not stored in device's ram have searched, filtered , shown user , this, utilize awesome library. may guilty of implementing in wrong way , that's why seek help in improving it.
android performance layout android-listview android-sqlite
No comments:
Post a Comment