Last Comment Bug 575523 - Firefox makes Xorg temporarily use excessive RAM while loading images
: Firefox makes Xorg temporarily use excessive RAM while loading images
Status: VERIFIED DUPLICATE of bug 395260
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: unspecified
: x86 Linux
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
  Show dependency treegraph
Reported: 2010-06-28 23:58 PDT by Alkis Georgopoulos
Modified: 2010-07-07 03:02 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Alkis Georgopoulos 2010-06-28 23:58:28 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a6pre) Gecko/20100628 Minefield/3.7a6pre

Good behavior: while loading a 5120x5120 image (=100MB raw data), Firefox memory temporarily increases by 100MB. Xorg memory is unaffected.

Bad behavior: while loading a 10240x10240 image (=400MB raw data), Firefox memory temporarily increases by 400MB. Xorg memory temporarily increases by *** 800MB ***.

It should be a bug and not a design problem, as it doesn't happen with all images.

The latter case is causing resource problems on certain websites when visited by low-RAM PCs. It also frequently crashes thin clients, which don't have much RAM, as application RAM usage is expected to happen on the server (=on the Firefox process) and not on the thin client (=on the Xorg process).

Other browsers, like e.g. chromium, do not experience such problems.

Reproducible: Always

Steps to Reproduce:
1. Open firefox and navigate to

2. Open `top` by using the following command line:
   top -d 0.1 -p $(pidof X firefox-bin chromium-browser | sed s'/ / -p /g')
Right click on the terminal title and select "Always on top" to better watch the problem, as it only happens for a couple of seconds.
You may also press "F", "o" and "space" to sort by VIRT memory.

3. Click on the 5120x5120.jpg image. Watch firefox memory climb by 100MB. Xorg is unaffected. No problem here.

4. Press [Back] and then click on the 10240x10240.jpg image. The following things happen in order:
   - Firefox uses 400MB RAM.
   - Xorg uses 800MB RAM.
   - Firefox releases 400MB RAM.
   - Xorg releases 400MB RAM.
   - If you switch to another window, after some time Xorg releases the other 400MB RAM too.
Actual Results:  
Xorg uses 2*[raw image size] MB RAM.
This only happens for certain images.

Expected Results:  
Xorg shouldn't be using any additional RAM.
It's ok for Firefox to use [raw image size] MB RAM, but not for Xorg.

Tested both with the 20100628 trunk
and with the Ubuntu Lucid 3.6.3+nobinonly-0ubuntu4 version.
Comment 1 User image Mardeg 2010-06-30 01:06:44 PDT

*** This bug has been marked as a duplicate of bug 395260 ***

Note You need to log in before you can comment on or make changes to this bug.