Closed Bug 921300 Opened 12 years ago Closed 1 year ago

Report image memory consumption on a per-tab basis

Categories

(Core :: Graphics: ImageLib, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: n.nethercote, Unassigned)

Details

(Whiteboard: [MemShrink:P2])

We do a pretty good job these days of reporting memory on a per-tab basis. But images are one big shortcoming, where we still report global numbers like this: ├──────654,896 B (00.08%) -- images │ ├──610,736 B (00.08%) -- content │ │ ├──610,736 B (00.08%) -- used │ │ │ ├──585,200 B (00.07%) ── raw │ │ │ ├───25,536 B (00.00%) ── uncompressed-heap │ │ │ └────────0 B (00.00%) ── uncompressed-nonheap │ │ └────────0 B (00.00%) -- unused │ │ ├──0 B (00.00%) ── raw │ │ ├──0 B (00.00%) ── uncompressed-heap │ │ └──0 B (00.00%) ── uncompressed-nonheap │ └───44,160 B (00.01%) -- chrome │ ├──44,160 B (00.01%) -- used │ │ ├──44,160 B (00.01%) ── uncompressed-heap │ │ ├───────0 B (00.00%) ── raw │ │ └───────0 B (00.00%) ── uncompressed-nonheap │ └───────0 B (00.00%) -- unused │ ├──0 B (00.00%) ── raw │ ├──0 B (00.00%) ── uncompressed-heap │ └──0 B (00.00%) ── uncompressed-nonheap Seth said it should be possible to report images on a per-tab basis. The tricky part is the fact that images can be shared between tabs. I see two options there: - Preferably, divide the size between the sharing tabs. The tricky part of this is we want to only measure heap memory (with a mozilla::MallocSizeOf function) once, so that DMD doesn't complain about double reports. It'd also be nice to indicate somehow if an image is shared, perhaps by having separate "shared" and "non-shared" buckets. - Less preferably, put shared images into a separate bucket, outside of the per-tab measurements. Bug 918207 makes this more important, BTW.
I would do both: report the images in a separate bucket, but also report in each tab how much of that image bucket is being used by that tab.
In about:memory's "explicit measurements" tree it's critical that there is no overlap, i.e. no byte of memory is counted twice. However, cross-cutting measurements (e.g. a different categorization) can be put in the "other measurements" section.
Whiteboard: [MemShrink] → [MemShrink:P2]
Severity: normal → S3

Dont we already do this now?

Flags: needinfo?(tnikkel)

No, not really. The images are listed by url but aren't associated to the tab that loaded them.

However, we now separate out tabs into processes by their origin, so there isn't usually any ambiguity about who to blame for images in a memory report. The usefulness of fixing this is much more marginal.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(tnikkel)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.