[Android] pinch-zooming https://treeherder.mozilla.org/jobs?repo=try is stuttery on Nightly
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
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
Reporter | ||
Comment 1•1 year ago
|
||
With ublock disabled : https://share.firefox.dev/3FiuBD4
Reporter | ||
Comment 2•1 year ago
|
||
Assignee | ||
Comment 3•1 year ago
|
||
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
Comment 4•11 months ago
|
||
I think I might be running into the same problem on basically every page, with my Samsung S21 5G.
Assignee | ||
Comment 5•10 months ago
|
||
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?
Assignee | ||
Comment 6•10 months ago
|
||
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
Comment 7•10 months ago
|
||
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.
Assignee | ||
Comment 8•9 months ago
|
||
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.
Updated•9 months ago
|
Assignee | ||
Comment 9•9 months ago
|
||
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)
Comment 10•9 months ago
|
||
Comment 11•9 months ago
|
||
bugherder |
Reporter | ||
Comment 12•9 months ago
|
||
This is pretty smooth now. Thanks!
Reporter | ||
Updated•2 months ago
|
Description
•