Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
555
Performance issue with DataSet having foreign key relationship
posted
I have a dataset that I bind to a grid: 

this.Grid.BeginUpdate();

this.Grid.SuspendRowSynchronization();

try

{

DataSet ds = DataAccess.Fill();

BindingSource bs = new BindingSource(ds, "MyTableName");

this.Grid.DataSource = bs;

}

finally

{

this.Grid.ResumeRowSynchronization();this.Grid.EndUpdate();

}

 The grid takes a very long time to simply load up only about 100 rows that each might have 0 or more FK relationship to a second table. When I removed the foreign key relationship the speed was increased by more than 100x. I have read Mike's article on Grid performance (http://forums.infragistics.com/forums/t/15306.aspx). From the sample code up top you can see that I have tried wrapping my dataset around a binding source (Following this guide http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9280). Still the grid takes way too long to load. Any suggestions?

 

Parents
  • 37774
    posted

    Does the DataSet have a recursive relationship?  You may want to try setting the DisplayLayout.MaxBandDepth to something much smaller, like 5.  There are performance issues with the currency managers when you get that deep, even when you use a BindingSource, and having 100 levels would easily slow it down by 100x or more.

    -Matt

Reply Children