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
150
Selecting a single row performance
posted

Hi,

I am using .NET 4.5 and Infragistics 2013.1

I have a WinGrid including about 140000 rows.

According to ANTS Profiler (see attached image) setting a previous found as selected row takes about 3 seconds.

Seems to be pretty much ...

Is there something I am missing?

Can you give me some advice for performance optimization, please.

Thanks,

Thomas

Parents
No Data
Reply
  • 48586
    Verified Answer
    posted

    Hello,

     

    Thank you for the provided code snipped. I have reviewed it very careful and I noticed that you have some flags which you are managing  in your Navigate method, and those flags are global variable. Here is what I think that happens in your case :

     

    You have subscribe for some Grid’s events in which, based on your flags you are executing some piece  of code (based on your code snipped I assume that you have subscribe for  SelectChaged event of UltraGrid, and  you should keep in mind that this event will occurs every time when call grdSAPMaterials.Selected.Rows.Clear(); or  row.Seceted = true;). So the code of this events actually  introduce your delay (again setting of row.Seceted = true; causes occurring of SelectChaged).

     

    To demonstrate what I talk about, I have created very simple sample, where am printing duration of each operation of your code snipped. I have subscribed for  AfterSelectChaged event of UltraGrid and have added following code to simulate long operation:

     
    Thread.Sleep(3000);

     

    Also I have added an option in the form which allows you to enable/disable firing of  AfterSelectChaged. So run the sample and press “Search” button, and observe the duration of each operation when the AfterSelectChaged is disabled. Now mark “Subscribe for SelectChanged event and sleep  for 3 sec.” CheckBox and observe the durations of the operations.

     

    Please let me know if you have any further questions or if I am missing something.

    122618.zip
Children
No Data