2
votes

I'm experiencing a huge memory increase when I'm doing a duration test with navigation between our webpages in our webapplication.

It's not a single-page-application, so I'm navigating with:

window.location.href = "linkToOtherPage.html";

This should clear all used memory right? What I notice in Chrome, is that then type=renderer process (the tab in Chrome) claims way too much memory. When navigating once each 2 seconds, it will eat 1000MB overnight. (Starts at 30MB).

Analyzing the js heap will result in a size of 4-5MB, so it's not in the JS-heap. Is it so that a memory-leak caused in JS/DOM will keep on living till you close the browser? I would've thought it would be cleared when you navigate to another page.

1
What's on your pages? Images? Flash objects? Videos? When you navigate over night every 2 seconds, are you just going between two pages or visiting hundreds of different pages? Any browser plug-ins involved?jfriend00
Two pages, it only contains a few buttons, some text here and there, 1/2 very small images. It will go from page1.html to page2.html, and from page2.html to page1.html.Eric Smekens
So, how did you solve this?rotaercz

1 Answers

0
votes

I didn't quite understand the situation but maybe this is useful:

window.location.href actually loads the page from the cache and maybe if you are referring to the same page over and over again and if the audio src is going to be changed through ajax request maybe you are having all the data saved to the cache?! window.location.reload(true) actually does the trick on getting the data again all from the server.

I'm not sure if I helped you in any way. But if not, sorry for the disappointment! ;D