I was wondering how you guys would handle filling a list view with something
like 10,000 items which each have 10 sub items on them... there has to be
major speed issues with that right? Yet, applications like outlook and such
can retrieve and display tens of thousands of emails with virtually no
performance hit at all... how would we go about getting a .NET listview to
get similar performance? when I try to do what I said above, it takes about
15 seconds or more to fill it with that much information and that is just
random test data... not real life from a database data either 5 3650
Welcome to the world of threading!
Load the visible page, then continue to load the rest in another thread.
There is a good example in chapter 10 of: http://www.apress.com/book/bookDisplay.html?bID=173
The source code is available for download.
"Brian Henry" <no****@nospam.com> wrote in message
news:OM**************@TK2MSFTNGP11.phx.gbl... I was wondering how you guys would handle filling a list view with something like 10,000 items which each have 10 sub items on them... there has to be major speed issues with that right? Yet, applications like outlook and such can retrieve and display tens of thousands of emails with virtually no performance hit at all... how would we go about getting a .NET listview to get similar performance? when I try to do what I said above, it takes about 15 seconds or more to fill it with that much information and that is just random test data... not real life from a database data either
I do not think that it is a listview that is used; rather, I think that the
control is a datagrid. I also think that only that which is visible plus a
few more are actually loaded on initial load. The rest of the data is
loaded on demand to match the scrollbar. Counts, and pointers are the only
thing loaded on initial load.
"Brian Henry" <no****@nospam.com> wrote in message
news:OM**************@TK2MSFTNGP11.phx.gbl... I was wondering how you guys would handle filling a list view with something like 10,000 items which each have 10 sub items on them... there has to be major speed issues with that right? Yet, applications like outlook and such can retrieve and display tens of thousands of emails with virtually no performance hit at all... how would we go about getting a .NET listview to get similar performance? when I try to do what I said above, it takes about 15 seconds or more to fill it with that much information and that is just random test data... not real life from a database data either
The best performance I have gotten from a ListView is via
ListView.Items.AddRange(x)
where x is an array of ListViewItems. With the data volume you have,
I think the way to go is a worker thread that creates an array of
ListViewItems, loads data into the array, and from time to time calls
AddRange and reinitializes. Be aware of the need to execute AddRange on gui
thread rather than on the worker thread.
"Brian Henry" <no****@nospam.com> schrieb: I was wondering how you guys would handle filling a list view with something like 10,000 items which each have 10 sub items on them... there has to be major speed issues with that right? Yet, applications like outlook and such can retrieve and display tens of thousands of emails with virtually no performance hit at all... how would we go about getting a .NET listview to get similar performance?
You may want to use a virtual listview:
<URL:http://www.ilypsys-systems.co.uk/ils1controls.zip>
Note that .NET 2.0's listview control will support a virtual mode
('VirtualMode' property) which allows to display millions of items
blindingly fast.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
wow you are right, doing an addrange increased our performance by a lot of
time. Before it took 4530 milliseconds to fill, now it only takes 635
milliseconds
"AMercer" <AM*****@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com... The best performance I have gotten from a ListView is via ListView.Items.AddRange(x) where x is an array of ListViewItems. With the data volume you have, I think the way to go is a worker thread that creates an array of ListViewItems, loads data into the array, and from time to time calls AddRange and reinitializes. Be aware of the need to execute AddRange on gui thread rather than on the worker thread. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeffrey Silverman |
last post by:
Hi all, a request for opinions, please.
I am designing a smallish application to manage members of several
committees of a particula Organization. The structure of the system is as
follows:...
|
by: Guyon Morée |
last post by:
Hi all,
I am working on a Huffman encoding exercise, but it is kinda slow. This is
not a big problem, I do this to educate myself :)
So I started profiling the code and the slowdown was...
|
by: Neil |
last post by:
I have a situation with an ODBC linked view in an Access 2000 MDB with a SQL
7 back end. The view is scrolling very slowly. However, if I open the view
in an ADP file, it scrolls quickly.
I...
|
by: Brian Henry |
last post by:
I was wondering how you guys would handle filling a list view with something
like 10,000 items which each have 10 sub items on them... there has to be
major speed issues with that right? Yet,...
|
by: Brian Henry |
last post by:
Well here is the problem, I have a data set with about 9,000 to 20,000
people in it in the data table "people"... I am then reading it into a list
view one at a time row by row... adding each...
|
by: jphelan |
last post by:
Ever since I successfully applied some techniques for increasing the
speed of my 17 meg. Application; it has only made me hunger for more.
First, let me list what I have done so far:
1. Split...
|
by: Alexnb |
last post by:
Hello
I am sure most of you are familiar with py2exe. I am having a bit of a
problem. See the program has a few pictures involved and the .ico it uses
for the windows. However, the pictures are...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |