Home - Forums-.NET - FlyGrid.Net (Windows Forms) - FlyGrid/Tree Performance

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

FlyGrid/Tree Performance
Link Posted: 22-Nov-2005 11:16
Hi all,

I've been toying around with this component today and I've had quite a bit of success getting it to do what I need in a quick fashion.  I have a component that is derived from NineRays.Windows.Forms.FlyGrid that is used to build my structure.  This component has a method on it called PopulateTree that builds the nodes, which are derived from NineRays.Windows.Forms.Data.Node.  I setup my tree this way because I am having to do quite a bit of business logic and this is keeping things structured.  The entire tree is loaded up front so there is no populate of data when a given node is clicked, collapsed, etc.

Now, since the history lesson is over I'll get to the issue. ;)  I am having a bit of a delay opening and closing nodes.  This delay is in the range of one second but it seems when I click I have to be informed that it is going to take just a second to show or hide the child nodes.  Unfortunately my users are morons and they'll click the beejesus out of this tree due to the one second delay.  Also, they are spoiled from a PureComponents navigator I've been using that is blazingly responsive.  ;)

My question is, has anyone else ran into a similar performance issue?  Could it be possible that some events are getting thrown that I do not know about?  If so, could those events be unhooked?

Thanks ahead,

Corey
Link Posted: 22-Nov-2005 11:23
On a side note I have just noticed that the grid is quite a bit slow when I scroll or resize the form.  

Thanks,

Corey
Link Posted: 23-Nov-2005 03:28
Yet another update.  I went through my code and removed all the columns from the grid except the heirarchical column that is used to show a list of clients and contains several inner nodes.  After getting down to just the heirarchical column speed has increased dramatically.  I went back and added another column to be sure that having more than one column is what was slowing me down and sure enough adding the new column slowed down the rolling and redrawing of the tree tremendously.  The ability to have more than one column per node and for it to work quickly is quite necessary for my clients.  I am going to keep toying with it this morning so please post if you have any leads, it would be nice to convince the boss to purchase this component today.  ;)

Thanks,

Corey
Link Posted: 23-Nov-2005 04:37
Ok, I have an answer!!  

At certain points in my code values that were being put into certain columns were set to null.  I didn't expect this to be a problem, but it appears that if you set these values to null very bad things happen internally that cause the grid to get very slow.  I went back through and set every value to string.empty where I was previously setting null and wham-o the flygrid is blazingly fast again.

I'm suspecting that somewhere internally the developers are not expect the values in the grid to be null so when .ToString is getting called on the cell's value an expection is thrown that I cannot touch.  This is just a guess though, hope you guys can duplicate this problem on your end.  I'll keep a watch in case anymore feedback is required.

Thanks,

Corey
Link Posted: 23-Nov-2005 10:45
Can you send us (develop_at_9rays.net) your code to give you recommendations to improve performance of FlyGrid in your app.