hguser
hguser

Reputation: 36068

how to find who is eating my memory in javascript

I have a page which contain six js included,when the page run about more than 5 mins(with user's operation),the page will turn to run slowly,and from the task manager,I see the browser take more than 150M memeory,so I think there must be a variable in my js which is eating my memory no-normally,but I have no idea how to find it.

Is there any tool or any idea?

Upvotes: 2

Views: 205

Answers (1)

neworld
neworld

Reputation: 7793

Gogle chrome can help you. Turn on Developers tools (press F12) -> Profiles and in bottom line you find "Take heap snapshot" (eye icon).

Or you can start profiling and determine, which function eat most CPU resources.

Upvotes: 4

Related Questions