Open Bug 1276044 Opened 9 years ago Updated 1 year ago

Images getting discarded too fast?

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

People

(Reporter: milan, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1259498#c11 #3 in the list: "My testing consisted of opening on the test page only and clicking with an interval of about 1 second. Firefox was not using much memory, there was no reason to throw away an image we had just used a second ago." The test page is this: http://www.oxfordstrat.com/about/ (I'm sure there are other examples)
Whiteboard: [gfx-noted]
Imagelib does not trigger the discard, that comes from elsewhere. From the attached stack trace, where I asserted if we called RasterImage::RequestDiscard on the background image in the header/menu, it appears that when the document has fully loaded, we eventually call nsSHistory::EvictOutOfRangeContentViewers here: https://dxr.mozilla.org/mozilla-central/rev/bd7645928990649c84609d3f531e803c2d41f269/docshell/shistory/nsSHistory.cpp#918 This in turn destroys an nsDocumentViewer and its presentation shell. The actual discard is requested here: https://dxr.mozilla.org/mozilla-central/rev/bd7645928990649c84609d3f531e803c2d41f269/dom/base/nsDocument.cpp#3870 and was originally added by bug 731419, with the intention of discarding the surface cache when the tab was closed. (Note, this cannot be reproduced alternating between two pages, only three or more.)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: