AJAX memory leak(?)

B

BillE

I have an existing asp.net 2.0 webforms app using master/content pages, and
it works fine.

I added some Ajax elements, including some UpdatePanels and modal PopUp
panels which contain asp.net controls like gridviews with selectable rows,
buttons, textboxes. I'm using Ajax 1.0, and the users are still using IE 6.

Some heavy users reported that the application starts to run slowly after a
while, and task manager shows the memory usage for IE increasing to 150 to
170 meg and up.

I have searched google, and read articles like "Understanding and Solving
Internet Explorer Leak Patterns", but I have not added any javascript with
the Ajax controls, so I haven't created any circular references or other
memory leak problems.

Is there a resolution for this apparent memory leak?

Thanks
Bill
 
M

MasterGaurav \(www.edujini-labs.com\)

Some heavy users reported that the application starts to run slowly after
a while, and task manager shows the memory usage for IE increasing to 150
to 170 meg and up.


Are you using few or more iframe's?
If so, see if you have some code like window.obj = item1 || { } or
parent.obj = item1 || { }
This is one of the most common source of memory-leak on IE.

I'm not quite sure if there's any place where these memory-leak cases are
put documented :)

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
 
B

bruce barker

but the toolkit controls generate a lot of javascript. you probably need
to break your down to smaller chunks, and test each control to find the
"leak".

-- bruce (sqlwork.com)
 
B

BillE

So the javascript generated by the ajax controls is causing the memory leak?

Once I have identified the control can I fix it, or just remove it?

Would it sound like whining if I said that MS should fix this?
 
B

bruce barker

if its toolkit control (say the modal), then its not MS, its a codeplex
open source project. you can download the source and post a fix.

-- bruce (sqlwork.com)
 
L

Laurent Bugnion, MVP

Hi,
So the javascript generated by the ajax controls is causing the memory leak?

Once I have identified the control can I fix it, or just remove it?

Would it sound like whining if I said that MS should fix this?

Which versionj of IE are you using? In my previous project, a web
application with a self written AJAX layer (this was before ASP.NET
AJAX), we found memory leaks in IE6 and reported to Microsoft. Most
leaks were solved by Microsoft in a "security patch" which was made
available something like 2 year ago, I guess. Some leaks still remain,
especially handle leaks. The problem is that it's quite easy to create
circular references in the web browser between the JavaScript engine,
the HTML engine and the CSS engine. These leaks are usually cleaned up
when the page is reloaded (because everything is garbage collected), but
with AJAX, pages are often not reloaded for days (in our case, a few
days at least are typical, this can go up to 3 weeks).

HTH,
Laurent
 
B

BillE

The client is using IE6.

Are these memory leaks caused by Ajax or in IE6? I realize that can't be
answered without identifying the memory leak, but I'm trying to figure out
whether to yank Ajax out of my app, which will be tough because now users
are used to it.

I'm surprised because my usage of Ajax involves just the simplest, most
basic implementation of an update panel and modal popup, yet it doesn't take
long before the thing bogs down and i hate telling users that they should
close IE every now and then to release memory!



Laurent Bugnion said:
Hi,
So the javascript generated by the ajax controls is causing the memory
leak?

Once I have identified the control can I fix it, or just remove it?

Would it sound like whining if I said that MS should fix this?

Which versionj of IE are you using? In my previous project, a web
application with a self written AJAX layer (this was before ASP.NET AJAX),
we found memory leaks in IE6 and reported to Microsoft. Most leaks were
solved by Microsoft in a "security patch" which was made available
something like 2 year ago, I guess. Some leaks still remain, especially
handle leaks. The problem is that it's quite easy to create circular
references in the web browser between the JavaScript engine, the HTML
engine and the CSS engine. These leaks are usually cleaned up when the
page is reloaded (because everything is garbage collected), but with AJAX,
pages are often not reloaded for days (in our case, a few days at least
are typical, this can go up to 3 weeks).

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 
L

Laurent Bugnion, MVP

Hi,
The client is using IE6.

Are these memory leaks caused by Ajax or in IE6? I realize that can't be
answered without identifying the memory leak, but I'm trying to figure out
whether to yank Ajax out of my app, which will be tough because now users
are used to it.

JavaScript runs in the IEXPLORE process, so the leaks were in this
process too. Symptoms were that if you left the web application (which
regularly connects to the server for a heartbeat) run too long, the
memory usage would grow uncontrolled, the number of handles too, until
eventually the application was so slow that we had to shut it down manually.

I'm surprised because my usage of Ajax involves just the simplest, most
basic implementation of an update panel and modal popup, yet it doesn't take
long before the thing bogs down and i hate telling users that they should
close IE every now and then to release memory!

I don't have much experience with ASP.NET AJAX. As I said, our flavour
of AJAX was self-made, and we were able to modify it until we were
satisfied.

HTH,
Laurent
 
B

BillE

Thanks.

Laurent Bugnion said:
Hi,
The client is using IE6.

Are these memory leaks caused by Ajax or in IE6? I realize that can't be
answered without identifying the memory leak, but I'm trying to figure
out whether to yank Ajax out of my app, which will be tough because now
users are used to it.

JavaScript runs in the IEXPLORE process, so the leaks were in this process
too. Symptoms were that if you left the web application (which regularly
connects to the server for a heartbeat) run too long, the memory usage
would grow uncontrolled, the number of handles too, until eventually the
application was so slow that we had to shut it down manually.

I'm surprised because my usage of Ajax involves just the simplest, most
basic implementation of an update panel and modal popup, yet it doesn't
take long before the thing bogs down and i hate telling users that they
should close IE every now and then to release memory!

I don't have much experience with ASP.NET AJAX. As I said, our flavour of
AJAX was self-made, and we were able to modify it until we were satisfied.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top