LWN.net Logo

Back and Forward Now Blazingly Fast (MozillaZine)

The latest Mozilla Firefox builds include a new feature. "The latest nightly builds of Mozilla Firefox include a new feature that significantly improves the speed of the Back and Forward buttons. When using Back and Forward in older builds, the page is retrieved from the local cache rather than the Internet but Gecko still has to reparse the HTML and use it to rerender the page, which can take a while with more complex documents. With this new feature, the rendered page is kept in memory, which makes Back and Forward performance much faster (almost instantaneous)."
(Log in to post comments)

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 7:07 UTC (Fri) by Klavs (subscriber, #10563) [Link]

Yikes.I hope that feature can be disabled. My firefox currently eats 130M of memory (and that's because I just booted up - it usually goes to 195M pretty fast - probably memory leaks?) and I have 25 tabs open. Thats approx. 5M pr. page. Usually the back history keeps up to 10 (or something) pages, so let's say that over the 25 tabs, I have an average of 3 pages in back history - that's a nasty 390M (minimum) more of memory eating.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 8:34 UTC (Fri) by nix (subscriber, #2304) [Link]

It's worse than that: Moz and derivatives also have hundreds of Mb in pixmaps in the X server.

A `feature' to speed things up by using more memory is *really* not what we need now, I feel.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 14:18 UTC (Fri) by gowen (guest, #23914) [Link]

A `feature' to speed things up by using more memory is *really* not what we need now, I feel.
  1. It's optional
  2. It's off by default
  3. Some people (maybe not you, sure, but me, for example) have slow computers with a lot of memory. This is actually exactly what people like I need.
By all means comment on what *you* need, but leave the "we" out of it.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 16:34 UTC (Fri) by nix (subscriber, #2304) [Link]

I guess it depends on the volume of RAM that the thing consumes and on the sheer amount of CPU time needed to render a page: but Moz takes <3secs to render elaborate pages on my 233MHz 586, so God knows what the target market of this is.

(If it can be turned off, then that's OK.)

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 19:32 UTC (Fri) by zlynx (subscriber, #2285) [Link]

I filed a bug asking for this feature for Mozilla waaayyy back when. I wanted it because I was using a local intranet page that had a really huge table in it. IE (running inside VMware!) could render the page from cache nearly instantly. Mozilla took over 5 seconds, and it was all in building the DOM and finding the final table column sizes.

I don't need it anymore, but it sure would have been nice to have then.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 7, 2005 23:19 UTC (Sat) by wcooley (subscriber, #1233) [Link]

> It's worse than that: Moz and derivatives also have hundreds of Mb in
> pixmaps in the X server.

I think perhaps you mean "hundreds" and "megabytes" separately. xrestop shows 248 pixmaps using ~3.3MB. Yes, that is hundreds of pixmaps using megabytes of memory, but not "hundreds of megabytes".

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 13, 2005 14:20 UTC (Fri) by nix (subscriber, #2304) [Link]

It may simply be that I've misread xrestop's output, but if so it's a repeated misread...

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 12:59 UTC (Fri) by rganesan (subscriber, #1182) [Link]

My sentiments exactly. I have only four tabs open and my firefox is already eating 112M (43M resident). My thunderbird is currently eating up 257M (61M resident) with three IMAP accounts. That's incredible bloat :-(.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 19:19 UTC (Fri) by zlynx (subscriber, #2285) [Link]

I think the memory usage is auto-tuned RAM caching. The more RAM you have, the more it will use. There was an article on this in, um, some magazine I read. :-) CPU? Maximum PC? Linux Magazine or Linux Journal? Anyway, the amount of RAM is adjustable in about:config if you find the right option.

The problem with that is of course, that the browser will have to read the cache off disk if it needs it.

Ah, here you go, a thread that talks about it:
http://forums.mozillazine.org/viewtopic.php?t=172041

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 6, 2005 13:34 UTC (Fri) by whitleych (guest, #6866) [Link]

I would assume (course we all know what that means....) that it is user configurable. So if you're worried about memory, turn it off (revert to prior operation?). Otherwise, both memory and hd space are inexpensive..... Right now i'm running 1GB and my motherboard will take another 1GB.

Now, if you're running it from a server...... Of course, as far as i'm concerned you shouldn't even have X running on a server, not to mention a desktop and a web browser..... Just my $.02.

Sounds great to me.

Posted May 6, 2005 14:04 UTC (Fri) by Max.Hyre (subscriber, #1054) [Link]

Others are upset by the memory bloat, but speed is my priority.

I usually have about a dozen open tabs, so I don't suffer so much from the memory hit, compared to those using two dozen or more. (I just fired up, and had only three tabs open, using about 13M. I opened a multi-page bookmark, giving me a total of 13 tabs, and memory went up to 40M, which is curious in light of the results reported above. I'm running Firefox 1.0.3 natively on WXP.)

`Back' and `Forward' are another matter. I often have a number of related pages in one tab, and want to flip between them, which I find faster than mousing to another tab, especially when I've opened or closed tabs, changing the positions of those remaining. I'm really looking forward to this modification.

I'd always wondered why moving around in the history took so long, but I just thought it was going to the source site every time (for reasons unfathomable). I hadn't realized parsing and rendering were sooo sloooow...

Sounds great to me.

Posted May 6, 2005 16:12 UTC (Fri) by kenmoffat (subscriber, #4807) [Link]

Maybe the memory usage onother OS is not being shown correctly. I've just started firefox about 10 minutes ago, and so far I've only got 7 tabs open. On i686 with high memory and nptl firefox-bin is taking 98M with another 4 to 5 M each for firefox and run-mozilla.sh.

Closed a couple of tabs, the memory usage hasn't altered. I don't care that much about the memory (ok, if I use my iBook I've only got 256MB of physical memory, so I'd get upset if it used an insane amount more), but the rendering speed has never been a problem for me.

Sounds great to me.

Posted May 7, 2005 23:07 UTC (Sat) by wcooley (subscriber, #1233) [Link]

Are you sure you're looking at actually used memory (RSS--resident set size) and not just allocated memory (VIRT/VSZ)? Applications will request allocations of memory, but a UNIX kernel (including Linux, of course) typically will not assign actual memory pages until the application tries to write to them. There may be a small overhead for the extra memory mapping in the kernel, but I think they're negligible (a few kB, at most).

Having just recently started Fx with 7 tabs open (Slashdot, FreshMeat, LWN, LXer, Daily Python-URL, this story and an RFC linked from a Slashdot story), I have 99.4MB VSZ and 34MB RSS--only 34MB is actually in use.

Sounds great to me.

Posted May 9, 2005 11:35 UTC (Mon) by andyh (guest, #26163) [Link]

Every time the issue of memory consumption comes up claims that the RSS column is the only one that matters. While this may be true for people with loads of ram, but for someone with only 256MB it isn't. RSS is often lower than the working set size because some of the process has been pushed out of memory by another program.

In my experience, firefox and mozilla tend to increase in size if you leave them open for a long time. If the process were really preallocating huge areas of memory at startup, the SIZE of the process shouldn't really increase with time. I usually restart them when they hit a SIZE of 350 and a RSS of 150 because the responsiveness of the system becomes unacceptable. I wish linux had a real working set measurement so people would stop defending bloat based on bad statistics.

Uning memory to cache the rendered version of pages in the history may actually help this situation. I often open new tabs to avoid having to wait for the back button to reload a slashdot page or a mailing list archive index. Opening and closing lots of tabs seems to make mozilla use lots of memory, so using fewer tabs with more caching will probably use less memory.

Naive memory-measurement methodology

Posted May 9, 2005 16:44 UTC (Mon) by Max.Hyre (subscriber, #1054) [Link]

Well, I just fired up the WXP Task Mangler, and checked the ``Mem Usage'' column. Right now it reads 26M, with ``Peak Mem Usage'' of 33.7M.

If anyone cares to know more, just describe where to find the numbers.

Sounds great to me.

Posted May 6, 2005 17:02 UTC (Fri) by acoffman (guest, #4599) [Link]

I'm using the nightly from April 5th - the feature was on by default.

I like it but this rendering issue was a pet peeve.

I've got about 10 tabs open with a couple of pages of back history and memory usage is at 29MB (WinXP). Firefox with just slashdot open is around 24MB so I don't think it will bloat memory usage as much as it might seem at first.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 7, 2005 8:07 UTC (Sat) by pointwood (subscriber, #2814) [Link]

I'm pretty sure it is a well known bug that Firefox doesn't properly release the memory when a tab is closed. I *think* it is scheduled to be fixed with Firefox 1.1, but I'm not sure - anyone able to confirm this?

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 15, 2005 19:41 UTC (Sun) by Tobu (guest, #24111) [Link]

There was a bug about 'memory usage does not go down after closing tabs', even though the memory limit was exceeded.
I have a trunk build, where this now works very well.
That can be checked with about:cache - quick test:
about:cache , look at the usage, about:config, set browser.cache.memory.capacity to a low value (in kb), my memory goes below that, open some pages so that the cache limit is exceeded, close some tabs, the memory goes down, wait about one minute, it goes below the limit.

Back and Forward Now Blazingly Fast (MozillaZine)

Posted May 15, 2005 21:11 UTC (Sun) by pointwood (subscriber, #2814) [Link]

Cool!

/me looks forward to Firefox 1.1 :)

Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds