Re: Firefox fat on Javascript?

[email protected] Thu, 12 May 2011 15:52:31 +0000
Newsgroups gmane.comp.mozilla.performance
Message-ID <[email protected]>
On Wed, 11 May 2011 01:27:01 -0400, Boris Zbarsky wrote:

> On 5/10/11 11:59 PM, [email protected] wrote:
>> [It seems reasonable for a browser to require at least 143 MiB of
>> physical memory.]

Maybe it is, but my intuition says otherwise; I doubt we will come
to a satisfactory conclusion in this discussion, so we'll leave it
at that.

>> Surely the Laws of the Universe do not require 2/3 of my physical memory to
>> run 3 different profiles of a goddamn web browser. Even Profile 0 seems a
>> little rotund; I mean, FFS, that little guy alone uses enough memory to hold
>> 16 fullscreen, 32-bit RGBA (that is, including alpha) dumps of my 1920x1200
>> resolution screen. WTF is Firefox doing?
>
> about:memory (especially with Nicholas Nethercote's recent changes) 
> should be able to tell you some of that.

The data from about:memory for each firefox instance follows; for reference,
here are the descriptions of the 3 instances (each of which runs a different
profile):

  Profile                     Usage
  -------                     -----
     0       Reading news (aggregators and otherwise),
             watching YouTube and other Flash video,
             making `First!' posts on slashdot, reading
             technical documentation, searching for
             everything via Google, editing Wikipedia, 
             etc. I pretty much do a little bit of
             everything with this instance and spend
             most of my time on the web using it.

     1       Basically just sitting there with one
             browser window opened to my Gmail account;
             I haven't been using it much lately... it 
             has literally just sat there, unused with
             Gmail ticking in the background.

     2       Running Vimperator with a few of [what I
             think are] relatively static pages just
             sitting there; maybe I'll make an         
             occasional Google search, but it mainly
             goes unused.


Profile 0: (heavy usage)

  Overview
  
    Memory mapped: 217,055,232
    Memory in use: 159,548,300
  
  Other Information
  
    Description                            Value 
  
    malloc/allocated.......................159,551,508
    malloc/mapped                          217,055,232
    malloc/committed.......................217,055,232
    malloc/dirty                             2,580,480
    js/gc-heap..............................32,505,856
    js/string-data                           3,484,380
    js/mjit-code...............................100,752
    images/chrome/used/raw                           0
    images/chrome/used/uncompressed............179,680
    images/chrome/unused/raw                         0
    images/chrome/unused/uncompressed................0
    images/content/used/raw                    893,214
    images/content/used/uncompressed........11,330,676
    images/content/unused/raw                      809
    images/content/unused/uncompressed...........1,024
    storage/sqlite/pagecache                 9,217,264
    storage/sqlite/other.....................1,537,152
    layout/all                               3,936,739
    layout/bidi....................................212
    gfx/surface/image                           79,112
    content/canvas/..................................2
    d_pixel_bytes                                    0

Profile 1: (Gmail)

  Overview
  
    Memory mapped: 367,001,600
    Memory in use: 222,837,828
  
  Other Information
  
    Description                            Value
    
    malloc/allocated.......................222,841,036
    malloc/mapped                          367,001,600
    malloc/committed.......................367,001,600
    malloc/dirty                             2,351,104
    js/gc-heap..............................97,517,568
    js/string-data                           6,139,150
    js/mjit-code...............................531,503
    storage/sqlite/pagecache                 6,041,992
    storage/sqlite/other.....................1,469,704
    images/chrome/used/raw                           0
    images/chrome/used/uncompressed............146,880
    images/chrome/unused/raw                         0
    images/chrome/unused/uncompressed................0
    images/content/used/raw                    214,097
    images/content/used/uncompressed...........350,396
    images/content/unused/raw                        0
    images/content/unused/uncompressed...............0
    layout/all                               2,782,929
    layout/bidi....................................462
    gfx/surface/image                           56,428

Profile 2: (Vimperator)

  Overview
  
    Memory mapped: 429,916,160
    Memory in use: 371,937,160
  
  Other Information
  
    Description                            Value
  
    malloc/allocated.......................371,940,320
    malloc/mapped                          429,916,160
    malloc/committed.......................429,916,160
    malloc/dirty                             2,019,328
    js/gc-heap.............................136,314,880
    js/string-data                           4,804,338
    js/mjit-code...............................229,488
    images/chrome/used/raw                           0
    images/chrome/used/uncompressed............133,060
    images/chrome/unused/raw                         0
    images/chrome/unused/uncompressed................0
    images/content/used/raw                  3,338,152
    images/content/used/uncompressed........29,185,369
    images/content/unused/raw                        0
    images/content/unused/uncompressed...............0
    storage/sqlite/pagecache                 4,865,440
    storage/sqlite/other.....................1,574,456
    layout/all                              11,508,560
    layout/bidi......................................0
    gfx/surface/image                          377,140
    content/canvas/..................................2
    d_pixel_bytes                            1,342,336

P.S.

For dubious reasons, Mailman munged the Message-ID of my last email,
which was:

  [email protected]

and before Mailman will munge the Message-ID of this email,
it is:

  [email protected]

If you add such munging to the fact that a user must subscribe to each
mailing list before posting, then I can safely say that Mozilla has one
of the worst communications infrastructures ever devised.