Joao:
There's only so much you can do with a listview and that many records.
Faster processors and more Ram can help too, but that's probably not always
an option. There are some constraints that you are forced to deal with, and
10000 records in a Listview isn't going to be blazing fast. just look at
Windows Explorer when you have 2000 files in a directory....Slooowwww.
I'd really consider taking another look at my UI strategy if speed is that
important and you have to use a Listview. When the user scrolls, add
another 100 or 200 records. This will occur much faster and the user isn't
really needed 10,000 records in one place at one time. If the user scrolls
only once or not at all, the other records dont' get loaded (this way they
aren't penalized with load times for data they don't need). If they keep
scrolling, then they'll get only what they need, until they have
everything...then scrolling will be relatively fast.
Others may disagree, but I'd seriously reconsider my strategy there if I
have to use a Listview and have to have 10,000 records...
You know, you can do a lot with grids and set their bindings and maniuplate
their styles..they are probably architecturally better suited for this type
of heavy lifting.
HTH,
Bill
"Joćo Santa Bįrbara" <jo****@mail.telepac.pt> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
thks william
it works better, but i need more performance... :(
thks anyway
JSB
"William Ryan" <do********@comcast.nospam.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... You can use BeginUpdate and EndUpdate...
http://msdn.microsoft.com/library/de...pdatetopic.asp
You might also want to break it up into smaller segments..there's no way
you can view more than a 100 or so items on the screen at once, so you can
fire additions whenever they scroll ....
HTH,
Bill
"Joćo Santa Bįrbara" <jo****@mail.telepac.pt> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl... Hi all
i have a datatable with 2500 records, and i want to fill a listview,
my problem is that it take too much time to load them all. is
anytihing i could do to
improve my performanēe..... ????
it take about 45 seconds with 2500, i need to put at least 10000 in
few seconds ... :(
See my code below perhaps you can help ..
thks
JSB
Me.lvwAvailable.Sorting = SortOrder.None
Dim iNum As IEnumerator = Me.DataSet.Contacts.Rows.GetEnumerator
While (iNum.MoveNext)
itm = Me.lvwAvailable.Items.Add(iNum.Current("ContactID" ))
itm.SubItems.Add(IIf(iNum.Current("ContactName") Is
System.DBNull.Value, "", iNum.Current"ContactName")))
Application.DoEvents()
End While