Open Bug 1782590 Opened 2 years ago Updated 2 years ago

[meta] WR Quality and Performance Work H2 2022

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

People

(Reporter: gw, Unassigned)

References

(Depends on 2 open bugs)

Details

(Keywords: meta)

No description provided.

A metabug for tracking the quality and performance improvements we're working on in webrender for H2 2022. Any bugs that are worked on as part of this work, and also those that are picked from the triage / priority list to be worked on next should be linked in to here.

Depends on: 1671784
Depends on: 1782317
Depends on: 1782001
Depends on: 1774253
Depends on: 1735008

I've been working through the list of existing bugs attached to the WR component, with ahale also working through the list. There were ~1800 bugs open when I started, that's down to 1571, I have closed ~220 bugs that were either no longer relevant, have been fixed, or were no longer useful to have open.

I haven't gone through every bug, but I've sampled enough to get a sense of major themes, summarised below (roughly in order of number of open bugs):

Bugs that can't currently be actioned:

There are many bugs that we can't do anything about, for reasons such as:

  • A WR panic that is extremely low volume and we cannot reproduce locally.
  • A bug we cannot reproduce, related to a specific hardware or environment. Sometimes we don't have access to the hardware or environment reported, and sometimes we have that but still can't reproduce locally.

Blob performance:

There are many bugs where scrolling or general performance issues are caused by blob rasterization. Some of these are caused by fallback due to presence of SVG filters that can be handled by WR. Implementing more SVG filters in WR (and making more use of the existing support in Gecko) will help with a number of these. More investigation of the specific bugs is needed to determine what we can improve on here (in absence of a long term solution, such as some of the prototype work Nical has done).

Snapping issues:

We have a number of bugs where there are either snapping artifacts (fuzzy text in some cases etc) or flow on effects from the current snapping implementation (incorrect rendering in some cases, such as segmented clip-masks with negative scale factor transforms, or performance issues caused by not being able to snap during display list building due to how we handle snapping of iframes on fractional offsets). Bug #1487858 is an existing meta for snapping issues.

Clipping performance (especially large masks):

There are many bugs where Gecko supplies a large clip-mask, these cause performance issues for many reasons (rasterizing the mask, GPU overdraw etc). We need to investigate the specific cases, but there's a number of possible improvements we can make (some options are supporting gradient masks, optimizing clip mask rendering and application). There's also some optimizations that can be made to how (and when) we segment primitives that would allow reductions in overdraw.

Performance of display list building (specifically not blob related):

These are typically scenes that have high primitive counts, or a very large display list for another reason (e.g. huge number of clips). For most of these, the problem is the amount of work per-item that both Gecko and WR need to do to build and process a new display list. We could do some micro-optimization here, but it won't significantly change the performance for those rare pages with tens of thousands of elements. We have some medium-term plans to improve this (e.g. interning in the content process during DL building). We also plan to discuss some longer-term architectural improvements at the next all-hands which would give us a roadmap to improve performance here.

Missing subpixel anti-aliasing on certain pages or layouts

There are a number of bugs related to page content that no longer receive subpixel AA on text. WR in general doesn't aim to get subpixel AA in as many cases as the previous renderer, for various performance and implementation reasons. However, we aim to have parity with other browsers where possible. There are some medium-scale changes we can make to picture caching that will allow subpixel AA to be enabled in several scenarios we don't currently handle. There are also some isolated, small changes we can make to handle specific cases without introducing significant performance penalties or complexity.

Small visual artifacts or bugs:

There are a number of these that we can work on as quality fixes that don't have implications that require larger scale refactoring or design changes, though not as many as I expected. There are some snapping-related bugs that would be good to fix, but these may not be simple or small changes to make.

General WR performance issues:

There's a number of bugs where certain parts of WR show up in profiles on certain pages that could be improved. There is some small-scale work that can be done here (such as optimization picture cache dependency updates, fixes to picture cache slice selections). There is also larger scale work that can improve things here (such as changing the threading model for scene/frame building). Changes to how we manage and upload GPU data (GPU cache, batching) are some improvements we could make that would improve performance on every frame.

Another theme I've encountered:

Snapping related artifacts - will follow up and add several of these (there is a meta) to the H2 quality list.

Depends on: 1767570
Depends on: 1515787
Depends on: 1661147
Depends on: 1785223, 1776068, 1787089
You need to log in before you can comment on or make changes to this bug.