Decode images in LIFO order

RESOLVED FIXED in Firefox 41

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: seth, Assigned: seth)

Tracking

unspecified
mozilla41
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

We should decode images in LIFO order. See bug 1152147 and related bugs for more justification, but the basic idea is that images we've requested decoding for more recently are more likely to be visible. If we decode in FIFO order and we fall behind, we can easily needing to decode a bunch of images that, say, have scrolled way off screen, before we can decode images that are actually visible. We see this happen in practice frequently in e.g. the B2G Gallery app and on desktop Firefox when scrolling image-heavy pages.
Here's the patch. So easy!

Nicely, this also makes things a little more efficient by eliminating the pop
from the front of the array that we used in the FIFO scheduler.
Attachment #8608398 - Flags: review?(tnikkel)
Attachment #8608398 - Flags: review?(tnikkel) → review+
Thanks for the quick review!

This is pretty trivial but I think it might uncover some hidden timing assumptions in our tests, so I'm going for a full try job on this one.
Hmm. This mostly look OK, but there seem to be a lot of timeouts and test failures on B2G Desktop Linux x64 opt. I'm not sure what's going on there... I've retriggered a couple of jobs to investigate further.
I think we're now ready to go, based upon what I'm seeing on the newer try jobs. (Kevin told me there may really never have been a problem other than infrastructure issues, which may well be true, because I certainly can't reproduce those older failures locally.) Let's give this a shot.
https://hg.mozilla.org/mozilla-central/rev/58e7ef3427ea
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.