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

Memory Usage For Radgrid in ASP.NET

5 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GarryP
Top achievements
Rank 1
GarryP asked on 31 Dec 2008, 02:35 PM
Hi,

When i run aspx application, which contains radgrid with sqldatasource, the memory gets increased very high. I am using a timer to update, which uses radgrid rebind method every 60 seconds. But if I leave it on for a day. I see the memory usage 300 mb, which is alot.

I used the following methods to dump memory usage but still no use.

RadGrid1.Dispose()
sqldatasource = nothing

Is there any solution to this matter?

Thanks

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Jan 2009, 05:40 AM
Hi  GarryP,

I have seen some where in the forums that this issue can happen with Grid containing large number of rows and columns. Can you try setting Paging in Grid with PageSize set to some smaller values and see if it is working.

Shinu
0
GarryP
Top achievements
Rank 1
answered on 02 Jan 2009, 09:53 AM
PageSize was set to 10 originally from the properties but i reset it to 1 as you said and i did radgrid1.rebind every one second in the timer and it goes up to 5 mb every minute from the memory usage. Grid is quite big and even though there is no any data in the radgrid for the selected day from the radcalender, memory usages keeps going up at 5 mb every minute.

Is there any other solution?

Thanks
0
Rosen
Telerik team
answered on 06 Jan 2009, 12:07 PM
Hi GarryP,

Can you please specify which processes you are refereing to that has memory consumption increased. Is it the browser's or the IIS's one?
Please have in mind that MS AJAX framework itself have some memory leakage. Thus when the page is refreshed through ajax request causing, the browser's process to allocate more memory. However this memory usually is freed after regular page postback. Also you may consider decreasing the rate of refreshes too.

Best regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
GarryP
Top achievements
Rank 1
answered on 07 Jan 2009, 02:23 PM
Hi Rosen,

The asp.net application is on ISS but we call it from windows form. I added a tool called webbrowser to the form and linked it too the directory on the asp.net website, which was login.aspx etc...

I removed ajaxpanel and disabled ajax option on the radgrid then memory usage slightly reduced. In the timer for a test purpose, i run it every 1 second and it starts off 20 mb and in two hours it went up to 65 mb eventhough there is not much data in the grid. I am sure it will be at least 300 if i leave it on for a day

I use radgrid.rebind method in the timer. Also the radgrid width was 1500px. The code I implemented to reduce memory usage as follows but there was not any use of it.

Private Sub processesRadgrid()

  Dim dataSource As New SqlDataSource 'setting a new instance to reduce memory usage
       
        Try          

            dataSource.SelectCommand = SqlDataSource1.SelectCommand
            dataSource.ID = SqlDataSource1.ID

            RadGrid1.DataSourceID = dataSource.ID
            RadGrid1.Rebind()

            dataSource = nothing

        Finally

            RadGrid1.Dispose()


        End Try
       
        End sub

Protected Sub RadAjaxTimer1_Tick(ByVal sender As Object, ByVal e As Telerik.WebControls.TickEventArgs) Handles RadAjaxTimer1.Tick
        Call processesRadgrid()
End Sub

I am also using radcalender too and still could not find a way to reduce the memory usage to normal level. Is there any other way of solving this problem?

Thanks




0
Rosen
Telerik team
answered on 10 Jan 2009, 07:48 AM
Hello GarryP,

I'm  afraid that I'm unable to reproduce the described behavior on my local machine. Can you please consider providing us (attached to a formal support ticket) a small sample application in which this behavior can be observed?  Thus we will be able to test it locally and provide you with more concrete answer.

Also can you please check if accessing the web application directly from the browser will yield same result.

Kind regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
GarryP
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
GarryP
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or