469,909 Members | 1,653 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

AJAX memory leak(?)

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

Jun 20 '07 #1
8 4002
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
-----------------------------------------
Jun 20 '07 #2
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)
BillE wrote:
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


Jun 20 '07 #3
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?

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
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)
BillE wrote:
>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

Jun 20 '07 #4
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)

BillE wrote:
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?

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>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)
BillE wrote:
>>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

Jun 20 '07 #5
Hi,

BillE wrote:
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
Jun 20 '07 #6
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, MVP" <ga*********@bluewin.chwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

BillE wrote:
>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

Jun 21 '07 #7
Hi,

BillE wrote:
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
Jun 21 '07 #8
Thanks.

"Laurent Bugnion, MVP" <ga*********@bluewin.chwrote in message
news:eW*************@TK2MSFTNGP02.phx.gbl...
Hi,

BillE wrote:
>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

Jun 21 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by ranjeet.gupta | last post: by
17 posts views Thread by Josť Joye | last post: by
20 posts views Thread by jeevankodali | last post: by
23 posts views Thread by James | last post: by
9 posts views Thread by CeyloR | last post: by
3 posts views Thread by HarryA | last post: by
7 posts views Thread by =?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?= | last post: by
22 posts views Thread by Peter | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.