views:

148

answers:

2

Hi,

We're carrying out testing of our ASP.Net AJAX application, and are finding memory usage in Internet Explorer 6 & 7 increases by at least 2mb for each page refresh - whether refreshing the same page or navigating to a new one.

This happens on the most basic of maintenance screens, and even on the main page where we've only got the application logo and the menu (uses the ASP.Net Menu control + CSS extenders).

Testers are reporting some slowdown on IE6 as memory usage peaks - none of the memory seems to be being reclaimed when a page is destroyed.

I've been looking around ASP.Net forums/doing some googling and have disabled CSS scripts, javascript includes, script manager control one by one - the scriptmanager seems to be the biggest culprit I've found so far... but it's kinda necessary for an asp.net ajax site!

Current options enabled are caching in web.config, LoadScriptsBeforeUI="false", ScriptMode="Release", and CombineScripts="true" on the script manager.

Any tips to reclaim some this memory and/or stop memory increase when a user refreshes a page/navigates to a new one?

Cheers,

Paul

A: 

Have a look at this article - the things explained there apply to all browsers but IE is the worst of all regarding memory leaks. Maybe you can find a pattern you are using in your application very often and just by correcting this will save you the 2 meg.

Joscha
I've run sIEve over it, and with the exception of a 3rd party control on one of the pages - no leaks detected.
Paul
+1  A: 

I used the DRIP utility to track down leaks in IE6 a couple of years ago. I've been using ASP.NET AJAX and JavaScript ever since in both IE6 and IE7 without issue on an intranet site with over 300 concurrent users 24/7.

Make sure your version of IE6 is the latest patch (if you MUST run IE6!).

Other than that, the article suggested by Joscha is your best bet. Most leaks are caused by JavaScript other than ASP.NET AJAX which I haven't found to be buggy.

PapillonUK
Yeah - the version of IE6 the client insists on the SP2 version. I've observed the ToolkitScriptManager eats up 1-2 mb of RAM per refresh (even when it's the only control on the pagE), rolling back and using the asp scriptmanager (requires a previous version of the toolkit to work) seems to keep the memory usage to a couple hundred KB per request.... confused.
Paul
Hi Paul - I sympathise - my site also has to work with IE6. we have IE SP2 ver 6.0.3790.3959 and have no memory leak issues.HOWEVER (!) I'm not using the Toolkit so can't really advise on that. From what you're saying, it does look like that is the culprit rather than the standard ScriptManager which i've had no issues with. Make sure all your code validates against the HTML/XHTML spec you're working to. I've known unclosed elements to cause leaks in the past.Also found this link: http://isaacschlueter.com/2006/10/msie-memory-leaks/
PapillonUK