Firefox fat on Javascript?

[email protected] Wed, 11 May 2011 03:59:27 +0000
Newsgroups gmane.comp.mozilla.firefox.vimperator,gmane.comp.mozilla.performance,gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
[I apologize to the members of the [email protected] mailing list,
 who have basically received 2 copies of this email; I didn't realize
 I needed to be subscribed to the other mailing lists before posting,
 and I wanted to keep you in the loop--but I guess that's kind of
 silly anyway, because maybe you can't talk to each other anyhow...]

Firefox has always eaten way too many resources in my opinion, and my
hunch is that the Javascript engine is largely to blame, but I must
admit that I'm quite possibly wrong about that and have not done any
appreciably technical testing on the matter.

Currently, I'm running 3 instances of Firefox (because Firefox handles
profiles in a broken way). I usually use the `Vimperator' extension,
but I've only enabled it on one of these instances:

  Profile                     Usage                       top's %Mem (RES)
  -------                     -----                       ----------------
     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,     14.2% (143 MiB)
             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     24.6% (248 MiB)
             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             26.4% (266 MiB)
             occasional Google search, but it mainly
             goes unused.

Guys, what is going on here?

I realize that there are all sorts of wonky things that come into play
with regard to memory usage (glibc gobbling up memory and never telling
Linux it's free, shared libraries being... well... shared, virtual memory
blowing smoke and throwing around mirrors, etc.).

However, I think it's safe to say that what is essentially an untouched
GUI frontend to Gmail should not register as taking up 248 MiB of my
physical memory! and neither should a couple of windows with some static
text and pictures in them just because of a few interface tweaks
(`Vimperator').

Why would the relatively unused Profiles 1 and 2 be taking up almost
twice as much memory as the much more heavily used Profile 1?

Could the long-lived Javascript programs that underly Vimperator and Gmail
be the culprits? Are they badly programmed? Is the Javascript engine badly
programmed?

Guys, please.

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?

Sincerely,
Michael Witten