From bug 1122704, it sounds like we hold alive some decoded image data even for tabs that are closed, for 60 seconds. It would be good if we could communicate to imagelib somehow that the tabs are gone for real and so it is okay to throw out that image data immediately. Surely there's some DOM code around somewhere that knows when this is happening, and we could stick some kind of callback into imagelib there. Maybe this would be WindowDestroyedEvent::Run()? (Seth also mentioned that it might be useful to know when a page enters the BF cache, to distinguish the case when an image just scrolls off the page, and I think there's also some DOM code that knows that, too.)
Thanks for filing. I think we really need to make this information accessible to ImageLib. We also want things like different synchronous decoding behavior for scrolling vs. navigating back to a page, and not having this info has bit us in that area too.
Sounds reasonable to not conflate what we already know about these images and be able to separately query for these.
With bug 1125490 fixed we should discard when a document is destroyed. So this bug is basically fixed then, no?
(In reply to Timothy Nikkel (:tn) from comment #4) > With bug 1125490 fixed we should discard when a document is destroyed. So > this bug is basically fixed then, no? Well, the problem in the title of the bug is basically fixed, but I do think we can still be smarter about this stuff. Let's rename the bug.
Summary: Discard decoded image surfaces more aggressively for closed tabs → Discard decoded image surfaces more intelligently
Is this just desktop, or does it affect B2G and Fennec as well?
Whiteboard: [MemShrink][gfx-noted] → [MemShrink:P1][gfx-noted]
(In reply to Nicholas Nethercote [:njn] from comment #6) > Is this just desktop, or does it affect B2G and Fennec as well? It affects every platform in some sense, though this bug is really more about adding a mechanism than adopting policy. It's not unlikely that we'd have different policies for discarding for desktop vs. Android vs. B2G.
Adding bug 1135313 as a blocker, because it looks like it will make it simple to answer the question "is this image in a live document?", and being able to answer that is probably the first step in implementing the more detailed tracking discussed in this bug.
3 years ago
Whiteboard: [MemShrink:P1][gfx-noted] → [MemShrink:P1][gfx-noted] [platform-rel-Intel]
platform-rel: ? → ---
Whiteboard: [MemShrink:P1][gfx-noted] [platform-rel-Intel] → [MemShrink:P1][gfx-noted]
2 years ago
Priority: -- → P3
Timothy, do you think this is good enough now, or should we keep it around?
You need to log in before you can comment on or make changes to this bug.