Not wanting to make anyone feel like sides are being taken, but I support Vis' point here.. I'm currently doing work for a company with a large customer service department and all calls are logged. The Customer Services Manager said he wanted to see all the calls and information about them in a table. I pointed out that I didnt think he would get much out of my providing a facility that allowed him to scroll up and down a million rows - one pixel scroll of the scrollbar jumped more than a page of information anyway.
There comes a point where data is jsut data, and loses any relevant meaning as information purely through volume.
If I were in your warehouse scenario I would have declined to provide a list of all stock items for the same reason that I would decline to write a program that searched the entire public drive and combined all word documents into one.
Rich, your point about the bos being the client and hence must be provided with what he wants is valid, but generally management arent skilled or technical, and cannot envisage a good way to do things on a technical level. i.e. They might tell you what they want, but they dont have much of a clue what it is they actually want. As a consultant, your time is best spent easing your workload and reducing resource demand through user reeducation in this stage
now, back to the question:
Hi,
I need to "quickly" display 30,000+ records in my datagridview. Using a traditional dataset & fill like
http://www.codeproject.com/useritems/DataGridView__GridView.asp
it takes upwards of 20 seconds for the DGV to display the records on a Intel DualCore 3Ghz 2GB RAM system (and of course hangs till it's done)
Is there any more efficient way to populate a DGV with this kind of volume async using a backgroundworker and perhaps a progressbar?
Thanks !
20 seconds? you gotta admit, it's pretty good hey? 1500 records a second, over a 100 meg network link, from a server with a huge memory and raid array, shoed into a poxy client, stored in a structure not really intended for massive volumes. If one of those records takes up 2kb in overhead, that's 3 megs a second! I'm pretty sure I dont see that often, over our network, so your setup looks pretty hot..
Short of creating a fatter network pipe and ensuriong youre using a native driver, there isnt much you can do. Download less data. Vis' point about the more information you show to the user, the more it reverts to meaningless data, is a worthy one.
On a side, you should know that there is nothing that will speed things up. Putting something on a background thread usually achieves the task slower, because CPU cycles are dedicated to keeping the UI responsive and processing the thousands of windowing events per second. The most efficient way to populate a DGV is to remove extranous data, leaving only that to be downloaded that is relevant - the true peak of efficiency; waste nothing.