Re: Explanation of ListView in virtual mode
Daniel Barla-Szabo <[email protected]> Wed, 8 Aug 2007 08:22:42 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
I agree, the virtual thing is definitely supposed to be ideal for these conditions... Well, you should probably do a quick test with 20/1000 and see what happens. I've seen quite a few articles saying that for extremely large lists, virtual mode is thousands of times faster, so I'd definitely try to see for myself. The only real problem I can see with RetrieveVirtualItem being called so many times would be a performance issue, but if your tests were to show that it ends up being faster anyways, then there is no real problem. -- Daniel. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Richard Kucia Sent: 07 August 2007 05:47 PM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Explanation of ListView in virtual mode Yes, it's the RetrieveVirtualItem event that has me puzzled. I have in mind an application which would use the ListView in several very different places. This test was for one of them, where the exact number of items is known and permanently fixed (20/64). However, I foresee a different usage, where historical realtime event data is appended to the ListView, and the number of events tracked can easily reach 1000 or more. So the virtual concept is perfect for that sort of thing, but if I'm having these problems with a setup of 20/64, I guess I won't need to explore 20/1000.... Rick -------------- Original message from Daniel Barla-Szabo <[email protected]>: -------------- > Hi, > > > The event handler that sends a ListViewItem > > I'm guessing you are referring to the RetrieveVirtualItem event? > > I threw together a quick test app here, and I'm seeing similar things to > you... Perhaps even more strange is that if I hover my mouse over an item, > the event just keeps firing. Perhaps it fires when Paint() is triggered? > > This might seem like a cheesy opt-out, but do you predict that your ListView > will grow in number of records? 64 rows by 20 columns should perform OK > using VirtualMode = false, or am I wrong? Depending on your exact > situation, it might be better to use the standard setup. > > Regards, > > Daniel. > > > -----Original Message----- > From: Discussion forum for developers using Windows Forms to build apps and > controls [mailto:[email protected]] On Behalf Of Richard > Kucia > Sent: 07 August 2007 03:58 PM > To: [email protected] > Subject: [DOTNET-WINFORMS] Explanation of ListView in virtual mode > > I am experimenting with the ListView in virtual mode. I have data for 64 > rows and a visible area for 20 rows. The ListView has 9 columns. > > The event handler that sends a ListViewItem includes a Debug.Writeline > statement, which I included just to see how .Net is invoking the event > handler. To my surprise, there's a very definite pattern. It invokes the > handler 12 consecutive times for item #0, then 12 consecutive times for item > #1, ..., down to item #19. > > What's it doing? Why can't it just accept the item I returned upon the first > invocation? > > Rick Kucia > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 2007/08/06 > 04:53 PM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 2007/08/06 > 04:53 PM