Closed Bug 1181421 Opened 9 years ago Closed 1 year ago

Scrolling on youtube is super janky

Categories

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

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

(Whiteboard: [gfx-noted] [platform-rel-Youtube])

Attachments

(1 file)

It seems like we can't layerize this page properly, so when we scroll we have to repaint all the time, which results in a janky scrolling experience.
Markus, you may be interested in this!
Flags: needinfo?(mstange)
Can you get a profile? The horizontal stripe pattern that paint flashing gives you here is actually the best case scenario - we only paint what is newly coming into view. And for me YouTube is actually one of the pages on which scrolling is mostly bearable.
Flags: needinfo?(mstange) → needinfo?(ehsan)
I can't really see anything "super janky" in the profile. I see a bunch of GC, and apparently we spend a lot of time looking up IOSurfaces for the plugin layer, but other than that it looks reasonable. Decreasing the profiler interval might help.
Can you try using the YouTube HTML5 player and see how that affects your scrolling experience?
https://www.youtube.com/html5
Hmm, I'm using the HTML5 version.  I think that is now the default for all Firefox users.

But right now I think scrolling is butter smooth and I haven't updated Nightly yet!  I bet this is intermittent.

(Note that maybe I'm using the wrong word.  Maybe jittery is a better word?  I wasn't seen long pauses, but more death by a thousand cuts, tons of tiny tiny pauses that looked like jitter.)
(In reply to Ehsan Akhgari (not reviewing patches, not reading bugmail, needinfo? me!) from comment #5)
> Hmm, I'm using the HTML5 version.

Hmm. There are definitely animated plugins showing up in the profile. Those might be ads then?

> (Note that maybe I'm using the wrong word.  Maybe jittery is a better word? 
> I wasn't seen long pauses, but more death by a thousand cuts, tons of tiny
> tiny pauses that looked like jitter.)

Ah, I see. Yeah, I think jittery is a better word in that case.

Could you get another profile with a decreased profiler interval? 0.2ms should be precise enough :)
Flags: needinfo?(ehsan)
Blocks: b2g-youtube
(This bug is about the YouTube website on Firefox Desktop on OS X.)
Only a few scrolling frames made it into the profile, but in those, I can see 10ms of GC per frame, and pauses in which we're just idle. I can't really explain the idle pauses; maybe what I'm looking at in the profile isn't actually scrolling. And 10ms of GC should be just short enough to not impact the frame rate. So I still don't have a good explanation for you, unfortunately.
(In reply to Markus Stange [:mstange] from comment #9)
> Only a few scrolling frames made it into the profile, but in those, I can
> see 10ms of GC per frame, and pauses in which we're just idle. I can't
> really explain the idle pauses; maybe what I'm looking at in the profile
> isn't actually scrolling. And 10ms of GC should be just short enough to not
> impact the frame rate. So I still don't have a good explanation for you,
> unfortunately.

10ms could be bad depending on the timing really.
Whiteboard: [gfx-noted]
FWIW, 10ms is the slice length for incremental GC while painting - adjustable through javascript.options.mem.gc_incremental_slice_ms in about:config, and slices are triggered through GCRuntime::notifyDidPaint() if an incremental GC is in progress. So it sounds like that's behaving as intended, though obviously it might not leave enough time for other stuff.

Reducing the incremental slice time is problematic because we have to do a bunch of work at the start of each slice - so if the slice time is too short, we might not make any progress (and will eventually force a full GC).
platform-rel: --- → ?
Whiteboard: [gfx-noted] → [gfx-noted] [platform-rel-Youtube]
platform-rel: ? → ---
Severity: normal → S3

Unable to reproduce in current versions.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: