Closed Bug 1079379 Opened 5 years ago Closed 5 years ago

Try decoding screenshots lazily when edge swiping


(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

Not set


(b2g-v2.1 fixed, b2g-v2.2 fixed)

2.1 S6 (10oct)
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed


(Reporter: etienne, Assigned: etienne)



(1 file, 1 obsolete file)

46 bytes, text/x-github-pull-request
: review+
Details | Review
In bug 1044125 we (rightfully) stopped keeping all the app screenshots around all the time.

But we're loading all of them as soon as the edge gesture starts, which makes the beginning of a gesture quite sluggish.

We can probably load just the screenshot that will be displayed next to make it faster.
Assignee: nobody → etienne
Attached file WIP (obsolete) —
Hey Aus, what do you think?

After a bunch of tries I think the best approach is to show the screenshots one by one as we swipe but to keep the sheets-gesture-end handler to hide all of them at the end of the gesture.

Just a WIP for now, I'll work on the tests tomorrow.
Attachment #8501198 - Flags: feedback?(aus)
Comment on attachment 8501198 [details] [review]

Definitely a great start! This will help most definitely with low memory profile devices. Probably doesn't help that we also have other perf regression dragging down waking up of an application but we're dealing with that in another bug (1069450).
Attachment #8501198 - Flags: feedback?(aus) → feedback+
Attached file Gaia PR
Cool, moving on to review with test added then :)
Attachment #8501198 - Attachment is obsolete: true
Attachment #8501747 - Flags: review?(aus)
Comment on attachment 8501747 [details] [review]
Gaia PR

lgtm! :)
Attachment #8501747 - Flags: review?(aus) → review+
Etienne, it would be awesome to land this on 2.1 as well (although, I'm guessing you were already going to ask for approval :))
Closed: 5 years ago
Resolution: --- → FIXED
Comment on attachment 8501747 [details] [review]
Gaia PR

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): perf regression due to the memory optim in bug 1044125
[User impact] if declined: the beginning of an edge gesture is really laggy
[Device impact] there a big memory consumption spike when the user starts an edge gestures (we load all the screenshots) with this patch we load them progressively
[Testing completed]: edge gestures scenarios, card view scenarios, + about:memory
[Risk to taking this patch] (and alternatives if risky): low
[String changes made]: none
Attachment #8501747 - Flags: approval-gaia-v2.1?
Attachment #8501747 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Needs rebasing for v2.1 uplift.
Flags: needinfo?(etienne)
Target Milestone: --- → 2.1 S6 (10oct)
You need to log in before you can comment on or make changes to this bug.