Sunday, March 11, 2012

CalendarExtender huge memory leak in IE

Clement,

I've not tested the CalendarExtender but I agree with you on Memory Leak with AjajToolKit in general. I think the problem is with IE because the same link and same content on FireFox renders fine, no memory leak there. I've tested Ajax Tabs control with GridView in them and while calling "__doPostback" from Javascript causes the memory leak. I've contacted ScottGu and Matt but haven't confirmed anything back from them yet.

Good luck!


Any word on this? Also..any alternatives to using the CalendarExtender?

Same problem I experienced here. I am using IE7 and still my IE process is getting bigger and bigger as I doing stuff (CRUD) on my page.


I try to comment most of code lines and to add step by step some lines. I reached a point where only the line that add events to a dynamically created element is commented in Common\Common.js file (and all $common.removeHandlers(...) in dispose method of the ControlExtenderBehavior.js to avoid error when removing event handler that are not added). Then there is no more problem.

To be sure I comment only the events parameter in createElementFromTemplate for the _popupDiv attribute of the CalendarExtender behavior and uncomment the previously commented line in common.js (then it is the original). Then I comment in initialize method all lines from _buildBody call (it left calls to _buildContainer and _buildHeader), it works also, whereas in _buildHeader, the events parameter of createElementFromTemplate method is used...I am a little bit lost now (perhaps like you...;))...I will continue tomorrow but I do not understand why there is a memory leak for the moment.

I also searched some information on memory leak in IE and found a utility like Drip that finds memory leak in IE (it works in my case) and some discussion about memory leak pattern, but I can't find any of these patterns in the code for the moment.

Clément


I am now sure from where come from the memory leak. I have only few lines of code commented :

- in the _popup$delegates table declaration, I comment the "select" delegate (1 line)

- in method _buildDays, _buildMonths and _buildYears, I comment all "events" parameters of createElementFromTemplate (3 lines)

and then there is no problem. The calendar cannot be used to select a day but, you can click next and previous month/year/decade, change mode and select today date.

I have come to this in two step:

- 1st: I resolve a first problem with commenting the select delegate of the popupdiv: because if I comment all but _buildContainer call in initialize method, I had a memory leak, but commenting the select delegate solve the problem (I do not understand what is this event, because even without it, calendar works fine with IE and Firefox).

- 2nd: the problem is that it is not the only problem...then I face the problem of events on days/months/years and I do not find why there is a problem, whereas the events used by these elements (div) are also used by next/previous/change mode/today elements and works fine for them. I cannot search more than some hours, I hope I will find but not sure...

If some one of the development team could help me, perhaps someone who nows how to identify javascript memory leak in IE, I will appreciate.


I fixed it seehttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=8191.

I did not manage to attach file but if you want it contact me.

Clément


Hi Clément,

I would sincerely appreciate it if you shared your fix for this nastly little bug. Check your Private Messages for my contact info.


Trevor


Madfun,

Would you (or anybody else) be able to provide an exact description of what CalendarBehavior.js lines to comment out for the part 2 fix?

I have found the 3 functions _BuildDays, _BuildMonths and _BuildYears but am unsure as to which lines to comment out (or is it lines in the dispose section?).

Hopefully somebody can help quickly, as a live project in now being held up by the calendar memory leak issue.

Many thanks


This is giving me problems as well. Apparently there is no fix for this yet that I can see? If anyone finds any information let me know thanks!

-Glyph


Has anyone fixed this? And if so can you please post the modified code pieces? That would be greatly appreciated. I just downloaded the latest ajax toolkit code base and the calendar memory leak is still happening. The DOM leaks go nuts when you select the date, not to mention just adding it to the page (the select types, table, div, etc.).

Any help would be very welcomed. Thank you.


Yeah, this is a joke. I have a page with cascading dropdowns and calendar extenders, and if you just navigate to the page and click on those items it goes crazy with the DOM leaks. The only solution I've found so far is to rip out all ajax tool kit items. They are pretty but do not work well.

Any ideas or alternatives?

Thank you

No comments:

Post a Comment