Hi there, Hope someone can help us. We have been doing some testing on our application and have noticed the memory used in IE/Firefox climbs with time. We think we've traced this to a timer refresh. This web app with a telerik grid, uses a timer to refresh this grid every 10 seconds. We've modified the refresh to 200 ms to make the memory leak show up earlier. We are using telerik MVC dated 2011.1.315. Regards, Sebastian<script type="text/javascript"> $(function () { setInterval('refreshRecent()', 10000); }); function refreshRecent() { try { $('#Grid2').data('tGrid').ajaxRequest(); } catch(err) { } } </script> @(Html.Telerik().Grid<MBM.Print.Wireless.WebUI.Models.JobModel>() .Name("Grid2") .DataKeys(dataKeys => dataKeys.Add(c => c.Id)) .DataBinding(dataBinding => dataBinding.Ajax().Select("_Recent", "Transactions")) .Pageable(paging => paging.Total((int)ViewBag.Total).Style(GridPagerStyles.NextPreviousAndNumeric | GridPagerStyles.PageInput)) .EnableCustomBinding(true) .Resizable(resizing => resizing.Columns(true)) .Columns(columns => { columns.Bound(c => c.SMT).Title(Global.DateTime); columns.Bound(c => c.Prn).Title(Global.Printer); columns.Bound(c => c.Doc).Title(Global.DocumentName); columns.Bound(c => c.PGS).Title(Global.Pages).HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align:center" }); columns.Bound(c => c.AT).Title(Global.Attributes); columns.Bound(c => c.Cst).Title(Global.Cost).HtmlAttributes(new { style = "text-align:right" }).HeaderHtmlAttributes(new { style = "text-align:center" }); }))
9 Answers, 1 is accepted
Actually, I'm able to observe almost the same behavior using only jQuery:
<script type="text/javascript"> $(function () { setInterval(refreshRecent, 1000); }); function refreshRecent() { try { $.getJSON('@Url.Action("_Select", "Home")', function() {}); } catch(err) { } }</script>All the best,
Rosen
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
I'm assuming you mean the grid uses $.getJSON and that it causes a leak?
Cheers,
Sebastian
Indeed, it uses $.ajax. As seen from my previous message there is an increase in memory consumption even when using only jQuery ajax therefore I suspect that the main cause for the issue is indeed this.
All the best,Rosen
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
We have tested this with jquery 1.6.2. It does not leak memory.
We are sure the Telerik Grid LEAKS CLOSURES.
Please advise.
--Sebastian
Unfortunately, I'm getting the same as previous behavior even with the jQuery 1.6.2. Please take a look at this short video. Maybe I'm missing something obvious.
Regards,Rosen
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thanks for going through all that effort. We initially did the same thing.
If we do the $getJSON test without Firebug on the memory seems to remain stable :).
Cheers,
Sebastian
P.S. A colleague of mine did a similar test with Google Chrome because Firefox seemed to leak memory randomly. The results showed jquery 1.6.2 being fairly stable.
I've just tested in latest official Google Chrome and it seems that the behavior is the same. See the video for more details ( the test project is the same as of my colleague Rosen).
http://screencast.com/t/rs7SGd3CfAKb
Best wishes,
Nikolay
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I can confirm the same behaviour with the latest Google Chrome build.
Thanks for you help guys.
Sebastian