Closed Bug 1859100 Opened 1 year ago Closed 9 months ago

[Android] pinch-zooming https://treeherder.mozilla.org/jobs?repo=try is stuttery on Nightly

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: mayankleoboy1, Assigned: jnicol)

References

(Blocks 3 open bugs, )

Details

Attachments

(2 files)

This is with Ublock plus installed.
open https://treeherder.mozilla.org/jobs?repo=try on Firefox Nioghtly for Android
Pinch zoom where there is a lot of text on the left-pane of try

ER: Stuttery pinch-zoom
AR: Not so

Profile: https://share.firefox.dev/46s9CJP , https://share.firefox.dev/3QgHVOs

With ublock disabled : https://share.firefox.dev/3FiuBD4

Attached file about:support

Thanks for the report. Your profiles look fairly innocuous to me, which is strange. The renderer thread in particular seems very quiet, and I cannot see many long composites.

However, I can certainly reproduce the stuttery zooming on several devices. Here's a profile I took, which looks much worse than yours: https://share.firefox.dev/48RcgdL

The draw call count is fairly high. Enabling gfx.webrender.debug.texture-cache I can see that we are rerasterizing glyphs for each zoom increment. I would guess this is causing the texture atlas to fragment increasing the draw call count.

On nightly we have "low-quality pinch zoom" enabled which should cause us to scale picture cache tiles when compositing rather than rendering at each zoom level. And even with that disabled we should be rounding the scale used for glyphs whilst zooming to avoid constant rerasterization (bug 1531142). On most webpages I see these are working, so there must be something about the treeherder page that prevents those mechanisms from taking place

I think I might be running into the same problem on basically every page, with my Samsung S21 5G.

The problem on treeherder is due to a specific problem with that page. There will certainly be other pages which do the same thing and have the same problem, but it seems unlikely that it's basically every page. So I think you may be encountering a different issue, Tom. Would you be able to capture performance profiles on some affected pages?

Flags: needinfo?(evilpies)

To clarify, "low-quality pinch zoom" is not the source of the problem. But rather the fact it is not working as intended highlights that there is a problem with picture caching on treeherder

This is a profile from https://hg.mozilla.org/mozilla-central/log/tip: https://share.firefox.dev/3ubVeYy. This has very noticeable stutter at various points when zooming. I do see a comparatively shorter, but still annoying, stutter on even simpler pages like https://hg.mozilla.org/mozilla-central/shortlog.

Flags: needinfo?(evilpies)

When updating the SpatialTree we record whether each spatial node is
itself or any of its ancestors are actively async zooming. This allows
us to make certain optimizations, such as low-quality pinch zoom mode,
or rounding the raster scale for glyphs.

The current implementation of this, however, contains a bug which
means that a node's is_ancestor_or_self_zooming variable will only be
true when itself or its direct ancestor are zooming, rather than
any ancestor. On certain pages this means we are unable to make the
aforementioned optimizations, resulting in poor performance. This
patch rectifies this problem.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED

The above patch should fix Mayank's issue on treeherder (and various other pages). I'm not sure whether it will fix yours, Tom. Please could re-test nightly in a few days, and if the problem persists please file a new bug with a new performance profiles. (And could you please use the "Graphics" profiler settings preset)

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce04bfaf8a42 Correctly track whether any ancestor spatial node is zooming. r=gw
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

This is pretty smooth now. Thanks!

Blocks: 1792390
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: