This is a migrated thread and some comments may be shown as answers.

Memory usage when sorting

7 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
May
Top achievements
Rank 1
May asked on 11 May 2010, 11:36 PM
Why does the memory usage keep increasing if you click the header and  sortt he same column  desc and asc  multiple times?

Thanks!

May

7 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 12 May 2010, 11:04 AM
Hi May,

Can you please send us a sample application which illustrates this increased memory usage? Also have to tried to run the garbage collector after the sorting? Are there any memory being collected?

Best wishes,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
May
Top achievements
Rank 1
answered on 13 May 2010, 05:13 AM
Hi Stefan,

Actually I tried one of the example from the Form http://www.telerik.com/community/forums/wpf/gridview/how-to-change-the-selected-row-style.aspx,  259205-rowselection.zip. If keeing clicking the column header n-times, the memory will go up. 

Thanks!

May
0
Stefan Dobrev
Telerik team
answered on 14 May 2010, 05:44 PM
Hello May,

I have tried with this sample, but after garbage collection is executed the memory goes back to its initial value. Can you please add a button to the example and attach this event handler to it:
private void Button_Click(object sender, RoutedEventArgs e)
{
    GC.Collect();
    GC.WaitForPendingFinalizers();
    GC.Collect();
}
Is your memory collected after clicking on the button?

Sincerely yours,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
May
Top achievements
Rank 1
answered on 20 May 2010, 11:28 PM
Hi Stefan,

I am against using GC.Collect(),  it should let the .Net framework do the Garbage Collection. Forceing the garbage collection may do more harm than good: http://geekswithblogs.net/sdorman/archive/2007/08/26/.NET-3.5-changes-to-GC.Collect.aspx

By the way, I also tried 

 

GC.Collect();

 

 

GC.WaitForPendingFinalizers();

 

 

GC.Collect();

 


The  memory didn't go back to its initial value, even I have the application open over the night. 

When scrolling thru the DataGrid, the memory also goes up too. 

Could you please give me other suggestion?

Thanks!

May

0
Stefan Dobrev
Telerik team
answered on 21 May 2010, 01:52 PM
Hello May,

You can try to profile the application with Visual Studio or windbg.

Sincerely yours,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
May
Top achievements
Rank 1
answered on 25 May 2010, 01:39 PM
Hi Stefan,

Probably I didn't make myself cleayly enough: I am NOT testing my own application amd I am testing with your example from Telerik support team http://www.telerik.com/community/forums/wpf/gridview/how-to-change-the-selected-row-style.aspx., 259205-rowselection.zip.  

Could you please ask your development team to take a look at 259205-rowselection.zip in that link? i did use the .Net memory Profiler,  the memory never goes down after sorting or scrolling. 

May

0
Stefan Dobrev
Telerik team
answered on 26 May 2010, 03:38 PM
Hello May,

We are also testing on exactly this application and all the memory is reclaimed correctly after garbage collection. Can you share more details about your machine? Is the processor 64bit one? How much RAM do you have? What .NET Framework version are you using?


Greetings,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
May
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
May
Top achievements
Rank 1
Share this question
or