Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

performance question

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support
View previous topic :: View next topic  
Author Message
netdeveloper



Joined: 19 Sep 2007
Posts: 2

PostPosted: Wed Sep 19, 2007 11:33 am    Post subject: performance question Reply with quote

Hello,
Recently i'm faced to performance problems concerning the microsoft datagridview control. I'm supposed to display thousands of records in it,
and it takes over 10 mins.
Hoping your control would be better, I installed one of your sample project, then modified connection strings to bind your datagrid to my huge table.
Unfortunately it takes the same time to display my table.

Is there a way to optimize the display of a big table?
Thanks by advance for providing assistance and code examples.
If I manage to have very fast display I will surely buy your solution.

Regards
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Sep 19, 2007 10:29 pm    Post subject: Reply with quote

Quote:
Recently i'm faced to performance problems concerning the microsoft datagridview control. I'm supposed to display thousands of records in it,
and it takes over 10 mins


10 mins for 1000+ records seems excessive - even for ADO.NET. You might expect that for 100,000+ records. What database are you using - are you sure there is not some other underlying issue with your connection/query.

Quote:
Hoping your control would be better, I installed one of your sample project, then modified connection strings to bind your datagrid to my huge table.


We don't have a datagrid - do you mean you have installed our Virtual Tree control?

Quote:
Unfortunately it takes the same time to display my table.


Are you using an ADO.NET dataset to load your data? This is usually the source of performance issues when browsing large databases. The ADO.NET dataset loads the entire database table(s) into memory upfront. This is the problem that Virtual Data Objects is designed to solve. It only loads the data when it is requested by the bound control.

This does require the grid you use to be smart about the way it requests data from the data source (if it iterates through every row in the data source upfront then you won't see any performance benefit).

Our Virtual Tree control is designed to only load the data it needs for the current display and so works extremely efficiently with Virtual Data Objects. The Virtual Tree sample projects include a sample project (Database Browser) that illustrates using Virtual Data Objects with Virtual Tree with very large databases.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
netdeveloper



Joined: 19 Sep 2007
Posts: 2

PostPosted: Thu Sep 20, 2007 10:28 am    Post subject: Reply with quote

Good day,

Thanks for answering, sorry for not being precise. i'll try to be now.
1) I use microsoft access as backend to my c# winfom application.
I read mdbs that may contains huge tables (100 000 records+) and display them on forms.
2) I tried to use Microsoft datagridview that comes with .net 2.0.
I attach a dataset to the datasource property of the datagridview.
3) I monitor the whole process and measure the time it takes:
for 100 000 records, 10 secs are spent filling the dataset, and 2 minutes are spent by the datagridview to display those.
This is an unacceptable wait for the user since the same operation in VB6 using vb6 datagrid take 4 seconds.
(of course I could wrap the vb6 datagrid and use it in my c# application, but i noticed lots of instability)

So I chose to see if your product could be performant in my case.
I went to http://www.infralution.com/virtualdata.html and used your .net Virtual Data Objects suite.
In the sample c# project provided, I replace the connection string to use oledb provider and set the datasource to my Access database path and name.
Now when I run the project, the .net datagrid takes a lot of time to display the 100 000 records.

Thats the summary of my case.

is there somthing wrong I did? if so, please help me and provide me a correct code example for my case.

Thank you for your support.

Regards
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Sep 20, 2007 10:45 pm    Post subject: Reply with quote

Thanks for the extra information. Under .NET 1.1 the standard DataGrid control was reasonably intelligent about the way it retrieved data from its data source, and retrieved rows as required to display the current data on screen. This meant typically only the first 50 or so items (rows) were loaded initially. We have not analysed the .NET 2.0 DataGrid behaviour - but it sounds from your description as if Microsoft have made some changes to its behaviour that adversely affect its performance for large data sources.

The standard ListBox and ComboBox controls (even in .NET 1.1) have always been very inefficient when databound. They iterate over the complete data source twice while creating a user interface element for each item. We will rerun some analysis to confirm exactly what the .NET 2.0 DataGrid is now doing.

The solution is to use a 3rd party grid control that doesn't attempt to load user interface elements for every row up front. As I mentioned previously, you can evaluate our Virtual Tree component which meets this criteria. The Database Browser sample (installed by the Virtual Tree setup) uses Virtual Data Objects to browse a large database - so it should give you an indication of performance of VDO with large datasources.

There are also a number of other good third party grids on the market - it would be a matter of trialling them and benchmarking the performance when using VDO as the DataSource
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group