3

Android ListView with SimpleCursorAdapter, takes time to display ListView for a large DataSet (for around 7000 records) . Is there anyway to optimize it?

From the log it look like getting the cursor is taking around 4-7 seconds. Let me know if anyone has a solution for this?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Sathish
  • 109
  • 1
  • 4
  • Here's an answer I posted earlier. http://stackoverflow.com/questions/5107724/large-listview-in-android/38041032#38041032 – user2288580 Jun 26 '16 at 17:20
  • You may check the "Performance Optimization for your own Adapter" section of this article. [http://www.vogella.de/articles/AndroidListView/article.html](http://www.vogella.de/articles/AndroidListView/article.html) Anyway do you really want to scroll though these 7000+ rows? – Ashen Randika Oct 20 '11 at 16:32

1 Answers1

2

A few ideas:

  1. Display data one page at a time. When you scroll down, load more data.

  2. Scrolling through 7000 records to go to the end will take forever. Access your data via a search form. Limit results to 100 records.

  3. If the data is sorted, group items together and provide an index. For example, alphabetical lists can be split into 26 subsets. The first page shows the alphabet, and you have to click on a letter to go to a subset.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Emmanuel
  • 16,791
  • 6
  • 48
  • 74