Before I start this question, I understand that every aspect of it is wrong. Please keep that in mind...
I have an CRM-ish intranet application with an integrated soft phone developed in 2001 that I've inherited. It's basically a collections application that integrates telephony controls with a web-based front end for account management. (Genesys telephony and an AS400-based collections system...using MQSeries)
I'm trying to modernize this application as much as I possibly can before I call it "end of life". As part of my attempts to modernize it, I've implemented jQuery & jQuery UI for my JS functionality and UI. I'm not going crazy with it, but it is pretty well ingrained.
Now, enter the problem: we currently use IE6 and the application is built using frames. The implementation of the jQuery libraries has exposed the sieve-like nature of the application from a memory perspective. It's currently consuming about 75Mb of memory on start up and grows to anywhere from 150Mb - 300Mb after about 2-3 hours. Then the browser crashes.
I've narrowed the memory leaks down to the cross-talk between the frames. I've tested the pages individually in sIEve and Drip and there are no leaks found. But access the pages within the frameset and it's a time bomb.
I know the answer is to redesign the application without frames and start using a better browser. There are two problems with that:
I've tested this on IE9 and the issues are still there, but a little more controlled
Redesigning the application would take about $500k and 6-12 months.
Does anyone know a way to resolve the "frame leak" issue? I know I haven't given any code examples but I'm just looking for general knowledge. I'm calling the IE CollectGarbage()
method at onload and onunload for every page in the application but to no avail. I've tried calling the empty()
method in jQuery. I've tried setting every child of the document.body
element to null
. Nothing is working.
I'd hate to have to back out all of these changes because there are actually some pretty large cost-cutting features that have been implemented.
ADDITIONAL INFO
I've managed to pinpoint the scenario in which the memory leaks occur. I thought it was "cross-talk" between frames but it seems that the memory leaks occur when a single frame is refreshed.
I set up a basic frameset with a 5 instances of the same page (one that I'm pretty sure has no leaks per sIEve).
<html>
<head>
<title>Frame Leak Test</title>
</head>
<frameset cols="*" rows="50%,50%" frameborder="1">
<frameset cols="33%,33%,34%" rows="100%">
<frame src="http://npasappgeneqa02/live/" />
<frame src="http://npasappgeneqa02/live/" />
<frame src="http://npasappgeneqa02/live/" />
</frameset>
<frameset cols="50%,50%" rows="100%">
<frame src="http://npasappgeneqa02/live/" />
<frame src="http://npasappgeneqa02/live/" />
</frameset>
</frameset>
</html>
The index page that is being loaded shows no leaks in sIEve.
When I load the frameset page in sIEve and click auto-refresh, there are no memory leaks reported. However, if I right-click -> refresh on an individual frame, 75% of the loaded items in the DOM get listed as leaks.
Obviously, the auto-refresh is equivalent to the F5/shift+F5 refresh. And that cleans out the memory for the page. But when an individual frame is reloaded, the memory never clears out...apparently. And every screen that my users have to see reloads into the main frame.
I can't simply refresh the frameset because there is a softphone in the frameset that will bring about Armageddon if it is refreshed or logged out of improperly.
Does anyone know of a way to control frameset memory without refreshing it?