On Thu, Sep 15, 2011 at 20:45, Mark Rubin <mark....@gmail.com> wrote:
> Hi, there,
> I'm profiling a single page web application (an extension, actually), and
> I'm trying to understand the memory characteristics of app. I've found my
> way to the "JavaScript memory" column, and I see two numbers of form
> xxxx (yyy live)
> What distinguishes the two numbers?
The first number is how much memory is reserved for JavaScript VM
heap, the "live" number is how much memory live (reachable) objects
comprise. You should worry about the second one, as the first is
derived from the second by V8 memory manager.
> Also, I have some guesses as to what sorts of things contribute to private
> memory that are not included in JavaScript memory, such as images, css (?),
> and so on. Can someone fill me in on what are usually the main contributors
> to tab memory that would not be included in JavaScript memory?
Image, Script and CSS caches are all contributing. Also, strings that
browser loads (e.g. script sources, XHR results) -- they reside in
tab's private memory unless they are modified by scripts on the page.
In that case string contents will be copied to JS VM heap.