Closed
Bug 98930
Opened 25 years ago
Closed 25 years ago
Seemingly excessive memory usage for large images
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
People
(Reporter: sharding, Assigned: pavlov)
References
()
Details
Mozilla seems to use an excessive amount of memory to load large (440K, in this
case) images. On my Linux 2.4.9 laptop with 128MB of memory, the memory use
jumps by 30-40MB when loading that image. A brand new mozilla on this system
uses about 21MB. If that's the first item I load, it jumps to about 55MB. If I
load another page (for example, bugzilla.mozilla.org) first, it still grows
about 30-40MB (i.e. this isn't just memory use from loading the first page of a
session). That seems like a bit much, and it causes lots of fun swapping and
corresponding poor performance. By comparison, Communicator 4.78 on the same
system starts out at 12MB and goes to 25MB if that image is the first item
loaded -- growing by only 13MB (less than half of mozilla's growth) and still
coming in barely over the memory usage of a brand new mozilla.
I'm using the 8-30 build at the moment.
Comment 1•25 years ago
|
||
Here is what I see:
1) Load image. Memory usage jumps by 40MB
2) Load any other page. Memory usage goes back down by 40MB
Now a brief calculation. The image is a jpeg. This means the 440KB is
compressed. The image is 2100x3122 pixels. To properly do compositing, one
needs to have an uncompressed/rendered copy of the image. Say we use 40MB for
the image. That means we average 6 bits per pixel. 6 bits is not even enough
to describe the allowed pixel values (2^8 of them) of a grayscale image.
Now obviously NS4 does something clever here (not doing alpha
compositing/transparency at all comes to mind, but let's give it the benefit of
the doubt).
So assigning to imagelib to investigate.
Assignee: asa → pavlov
Component: Browser-General → ImageLib
QA Contact: doronr → tpreston
Comment 2•25 years ago
|
||
oops. We're using 6 _bytes_ not 6 bits. And the X server is using about the
same amount, of course.
Comment 3•25 years ago
|
||
Talked to Pavlov. Apparently convert grayscale images to 24bpp. That would
account for most of the memory usage....
He says he has bugs on this already. Dupping against a likely one.
*** This bug has been marked as a duplicate of 51028 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•