Backbone.js Memory Management, Rising DOM Node Count

前端 未结 4 1316
忘了有多久
忘了有多久 2020-12-14 09:59

Situation: I\'m working on a pretty decently complex single page Backbone app that could potentially be running for 8-12+ hours straight. Because of this, t

4条回答
  •  死守一世寂寞
    2020-12-14 10:36

    The rising DOM nodes count is the main sign of a memory leak (usually in the code of our page). So you need to fight against it. The standard technique is described in the answer to this question.

    The snapshot content has too many details. And this 3 snapshot schema helps you to filter out not interesting part of the snapshot and shows only the candidates for a leak.

    Please be sure that you are running the latest version of chrome, as example Chrome Canary. It should be a fresh instance with single tab without extensions. It would be nice to have no error messages in console, no breakpoints and do not stop on an exception because all these things may affect the page and as a result the snapshot content.

    This post might be interesting for you too.

提交回复
热议问题