How to improve the speed of "listview" control?

  • Thread starter Thread starter Thomas
  • Start date Start date
T

Thomas

Hi all,

I am having an application which displays around 10000 records in a listview
control. However, the application does not work very well due to two major
problems :

(a) it takes several minutes to all the listview items

(b) when I use the method "listview.items.selected = true" to select a
particular listview item, the application will hang for a minute (and
sometimes even hang forever). I have tried to create a new thread to do the
selection, but it seems that the whole application is still hanged even if
the selection is done via another thread.

And I have tried to test the listview using different devices. It seems that
problem (a) occurs in any devices while problem (b) seems especially serious
for some devices only (using armv4t). Would somebody kind enough to tell me
how to improve the speed of the listview control?

Regards,
Thomas
 
I'm going to have to emphatically state that you need to rethink your UI
design. You're showing 10000 records in a list!? Who the hell wants to
scroll through something like that? Decreasing the amount of data in the
list will greatly improve the speed and usability of your app.
 
Yes, I do agree that such design on a handheld device does not make any
sense. However, it is my client who wants me to port their application from
a desktop computer onto a handheld device, without any modifying to their
original design.

Chris Tacke said:
I'm going to have to emphatically state that you need to rethink your UI
design. You're showing 10000 records in a list!? Who the hell wants to
scroll through something like that? Decreasing the amount of data in the
list will greatly improve the speed and usability of your app.

--
Chris Tacke, eMVP
Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Thomas said:
Hi all,

I am having an application which displays around 10000 records in a listview
control. However, the application does not work very well due to two major
problems :

(a) it takes several minutes to all the listview items

(b) when I use the method "listview.items.selected = true" to select a
particular listview item, the application will hang for a minute (and
sometimes even hang forever). I have tried to create a new thread to do the
selection, but it seems that the whole application is still hanged even if
the selection is done via another thread.

And I have tried to test the listview using different devices. It seems that
problem (a) occurs in any devices while problem (b) seems especially serious
for some devices only (using armv4t). Would somebody kind enough to tell me
how to improve the speed of the listview control?

Regards,
Thomas

 
I agree with Chris about having 10,000 items in a listview. Having said
that, just draw the items on a control and use a scrollbar to change what
gets displayed. If an item is selected, just draw white on black. Make
sure you only draw the visible items. If the item at index isn't visible,
then "items[index].Visible = true" will take almost zero time (it'll just do
"this.selected = = index"), and even if you want to force it to be visible,
you just need to draw the visible items anyway.

Hopefully you followed that ramble... :)

Hilton
 
Back
Top