Closed Bug 1458387 Opened 7 years ago Closed 6 years ago

https://www.oculus.com/go/ page has janky scrolling due to imagelib

Categories

(Core :: Graphics: WebRender, enhancement, P2)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jrmuizel, Assigned: aosmond)

References

(Blocks 1 open bug, )

Details

Near the "Immerse yourself in over 1,000 VR games, social apps, 360° experiences, and more." section things get really slow. It looks like something bad is happening with imagelib. https://perfht.ml/2I9L2pu
Assignee: nobody → aosmond
I expect bug 1337111 will help with this. You can see it spends a lot of time advancing the animation (e.g. doing the frame blending) and uploading the composited frame via an ImageClient. The bug will move the blending off the main thread, making RasterImage::RequestFrame very cheap, and it will also decode the frames into shared surfaces, avoiding the image client overhead.
Depends on: 1337111
Also interesting is the ScopedMap (de)allocation showing up in the trace for the imgFrame DrawableSurface. I have a patch to remove this extra malloc somewhere, I'll get that landed in a new bug.
The time that we spend doing the blend is an unreasonable 18ms. I suspect there's something more serious going wrong here. It would be good to see what the dimensions of the image that's being blended is.
The picture in question is composed of several stills and at least one animated image. The flag itself is an animated PNG, and is 2000x1000 -- it might contain the lights as well, it wasn't easy to tell just looking at the page. Past experience tells me I should expect that to be expensive, although I haven't checked for a bug. Since each frame will consume 7.62MB, so it will certainly be triggering the discard after displayed code to minimize memory usage at the cost of CPU. Perhaps I need to consider the total animation time as well, to allow a higher footprint for short (human time) animations...
Andrew, where did we end up with this one?
Flags: needinfo?(aosmond)
I got much better decoder performance with bug 1337111 and bug 1465619. I need those to land (in order) before I can then get async image pipeline which in theory should get us the rest of the way. I keep getting interrupted on the last piece but it isn't important if the previous bugs don't land.
Depends on: 1465619
Flags: needinfo?(aosmond)
I had a look at this on Windows and it was Ok, but not great. https://perfht.ml/2Ju5P3C The bulk of the time is sending the image across to WebRender. It looks like we create a new Shmems on every frame. Can this be avoided? I'm lowering the priority for now because it's not as bad on Windows.
Flags: needinfo?(aosmond)
Priority: P1 → P2
Blocks: stage-wr-trains
No longer blocks: stage-wr-nightly
Flags: needinfo?(aosmond)
Jeff -- Is this still a P2?
Assignee: aosmond → nobody
Flags: needinfo?(jmuizelaar)
Depends on: 1428558
Flags: needinfo?(jmuizelaar)
Assignee: nobody → aosmond
Update: This is finally coming together with bug 1504699. That's the last piece to solve the animated image perf issues on this page.
Depends on: 1504699
The page has changed, but the now integrated changes fixed all the image related problems.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.