My javascript is pretty simple. It just keeps calling ajax to load the data and display it on my screen. I reuse this DOM element by updating the data directly (using the jquery $ (DIV) .empty () function and then appendTo other content). However, after starting up at night, my computer freezes and seems to continue to do something.
I am trying to monitor memory consumption with some firefox addon. When working after two hours, the memory can grow up to 200 MB, but I'm not sure if this is caused only by my js or other reasons.
I have a question about this issue. 1. Is there a good way to control it (for example, how much memory is used on a particular web page, how much CPU resources are used and how?) 2. Is there some kind of general way to develop js web application to avoid such a problem ?
thanks, any comment is appreciated!
source
share