Platform/GFX/perf triage
The page contains a breakdown of performance related bugs and tasks for WebRender.
Bugzilla tree view of the wr-perf bugs: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1477376&hide_resolved=1
To determine in which category a performance issue fits in a good source of information is to set the pref gfx.webrender.debug.profiler-ui to "Frame stats,Time graphs, ,GPU". Also set "gfx.webrender.debug.profiler" and "gfx.webrender.debug.gpu-time-queries" to true. this should be enough to tell in which stage of the rendering pipeline the issue is. Then set the profiler ui pref to more specific counters to continue investigating (see the list of profile counters in profiler.rs).
Contents
High priority bugs
Metabug: wr-perf-p1
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1576637 | Nighty and Developer the scroll is jerky on Intel 4600 | Glenn Watson [:gw] | P2 |
defect | 1664478 | Blend modes and other effects on a single image force an extra intermediate target | P2 | |
enhancement | 1681310 | Add a code path for batched texture uploads via glTexImage2D | P3 | |
enhancement | 1681339 | [meta] Too much glyph rasterization | P3 | |
enhancement | 1404477 | Chrome repaints cause rebuilds of the entire browser scene | P3 | |
defect | 1595680 | Slightly different values in display lists causing extra picture cache invalidations. | P3 | |
defect | 1595909 | Image masks with different keys being added during scrolling | P3 | |
defect | 1599502 | A long time is spent in glBufferData during draw_instanced_batch (Intel) | P3 |
8 Total; 8 Open (100%); 0 Resolved (0%); 0 Verified (0%);
CPU time
Frame building
useful prefs:
- gfx.webrender.debug.profiler-ui: "Frame times"
Metabug: wr-frame-building
A few common themes:
- Many vector allocations add up to occupying a lot of the total frame building time.
- HashMap operations are also showing up.
- Removing redundant work or moving it to scene building can help a lot (for example Glenn's work on clipping).
- Some pages have a very high primitive count. Anything that can help amortize how costs scale with prim count helps.
- Timings tend to spike, so it's best to look at maximum times instead of averages. Spikes tend to line up with scene builds.
See also
26 Total; 26 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Scene building
Metabug: wr-scene-building
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
enhancement | 1654305 | Avoid allocations in ClipStore::push_clip_root | Nicolas Silva [:nical] | P3 |
enhancement | 1404477 | Chrome repaints cause rebuilds of the entire browser scene | P3 | |
defect | 1508116 | 4-5ms spent scene building new Gmail (scene building is too slow) | P3 | |
defect | 1582621 | Scene building takes too long (> 7ms) on the MotionMark 1.1 Multiply benchmark | P3 | |
enhancement | 1631756 | Build separate pipelines for the content and UI and stitch them up during frame building | P3 | |
enhancement | 1648091 | A lot of time spent reallocating vectors during scene building | Nicolas Silva [:nical] | P3 |
defect | 1493359 | https://lab.hakim.se/domtree/ is slower with WR | P5 |
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Renderer (Driver & ANGLE overhead)
Metabug: wr-renderer
Useful prefs:
- gfx.webrender.debug.profiler-ui: "Frame stats,#Renderer,Renderer graphs"
13 Total; 13 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Texture/Buffer uploads
Metabug: 1613407
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#GPU cache upload,#Texture cache update,#Texture uploads,#Texture uploads mem,#Rasterized glyphs,#Rasterized blob tiles"
See also:
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1599558 | Video texture upload still runs into format conversion | Dzmitry Malyshau [:kvark] | P3 |
defect | 1611582 | Scrolling on myheritage.com is very laggy with WebRender | P3 | |
defect | 1628736 | Slow scrolling performance on large changeset on hg.mozilla.org (VBO upload) | P3 | |
defect | 1676528 | Scrolling apple.com significantly slower with WebRender on 2018 MacBook Air | P3 | |
defect | 1478125 | Texture upload performance could be better on Windows | Jeff Muizelaar [:jrmuizel] | P3 |
defect | 1558677 | Makepad scrolling is slow with WebRender | P3 | |
task | 1567511 | Very noisy GPU times | P3 | |
defect | 1598789 | Terrible scrolling performance in portions of taskcluster log | P3 | |
defect | 1599502 | A long time is spent in glBufferData during draw_instanced_batch (Intel) | P3 | |
defect | 1521265 | Slow Frames detected on Slurpee Canada home page (canvas perf) | P5 |
10 Total; 10 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Batching
Metabug: wr-batching
Performance issues caused by high amounts of draw calls. 100 draw calls per frames is a reasonable amount (not a hard limit). Multiple hundreds, however, tend to cause excessive CPU usage in the renderer.
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#Draw calls"
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
task | 1585374 | Investigate batching algorithm improvements | Nicolas Silva [:nical] | P3 |
task | 1615613 | Unify the text and brush shader infrastructures | Nicolas Silva [:nical] | P3 |
task | 1622226 | Pack more images in the shared texture cache | P3 | |
enhancement | 1624272 | Decouple texture cache storage and batching | P3 | |
defect | 1627458 | Bad performance around covid map on theguardian.com | P3 | |
defect | 1637580 | Very poor javascript + SVG animation performance | P3 | |
defect | 1457806 | https://output.jsbin.com/surane/quiet is not smooth | P4 | |
defect | 1457683 | servo moire demo is much slower in Firefox + WebRender than in Chrome | P5 | |
defect | 1639889 | Scrolling hackmd.io is much worse in Firefox than Chrome | -- | |
defect | 1647903 | Scrolling https://github.com/servo/pathfinder/pull/350/files is a bad time | -- | |
defect | 1648597 | Pinch to zoom on https://shkspr.mobi/blog/2020/06/symbian-won/ is slow | -- |
11 Total; 11 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Picture Caching
Metabug: picture-cache-perf
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#Rendered picture tiles, ,Picture cache slices,Picture tiles,Picture tiles mem"
12 Total; 12 Open (100%); 0 Resolved (0%); 0 Verified (0%);
DisplayList building
Metabug: wr-displaylist-perf
Useful prefs:
- gfx.webrender.debug.profiler-ui: "Transaction times"
6 Total; 6 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Blob image rasterization
Metabug: blob-perf
Blob image performance affect SVG and a few drawing primitives that aren't supported by WebRender.
A few common themes in blob image performance bugs:
- Rasterization performance on the CPU (rasterization itself, malloc contention)
- Overhead of replaying commands on multiple tiles.
- Bad layerization causing many rasterized tiles and a lot of overdraw.
- Rendering very large blobs failing to account for parts that aren't visible.
- SVG filters on the CPU.
See also:
Useful prefs:
- gfx.webrender.blob.paint-flashing: true
- gfx.webrender.debug.profiler-ui: "#Blob rasterization,#Rasterized blob pixels,#Rasterized blob tiles,#Rasterized blobs"
43 Total; 43 Open (100%); 0 Resolved (0%); 0 Verified (0%);
SVG filters metabug: wr-svg-filters
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Glyph rasterization
These bugs affect CPU time and texture uploads.
Metabug: 1681339
Useful prefs:
- gfx.webrender.debug.glyph-flashing: true
- gfx.webrender.debug.profiler-ui: "#Rasterized glyphs,#Glyph resolve,#Texture cache update"
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1518995 | Outstream.com page tilt effect is very laggy and jumpy with WebRender enabled | P3 | |
defect | 1668431 | Slow scrolling on Google Pixel 5 store page | P3 | |
enhancement | 1681346 | Deduplicate system fonts in WebRender | P3 | |
defect | 1639889 | Scrolling hackmd.io is much worse in Firefox than Chrome | -- | |
defect | 1647484 | https://www.apple.com/macos/big-sur-preview/ has bad performance with WebRender | -- | |
defect | 1672235 | https://disneyanimation.com/data-sets/ renders slowly | -- | |
defect | 1674864 | Slow scrolling on https://stirringabyss.com/ | -- |
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Scheduling
Metabug: frame-scheduling
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#Content send,#API send"
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1668339 | Bad WR performance with low number of cores when the CPU is busy | P3 | |
enhancement | 1671490 | Increase the priority of the gpu process | P3 | |
task | 1612441 | Investigate whether we can avoid blocking during swap buffers in the renderer | P3 | |
enhancement | 1612443 | Do frame building and rendering on the same thread | P3 |
4 Total; 4 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Metabug: vsync
17 Total; 17 Open (100%); 0 Resolved (0%); 0 Verified (0%);
GPU time
Useful prefs:
- gfx.webrender.debug.profiler-ui: "Frame stats, ,#GPU,#Rendered picture tiles,|,GPU time queries"
- gfx.webrender.debug.gpu-time-queries: true
Caching
Metabug: wr-caching
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1463318 | https://flow.org/ runs poorly with WebRender on low end GPUs | P2 | |
enhancement | 1548396 | Support picture caching on child pictures. | P2 | |
defect | 1519718 | Slow Frames detected on singlesprout home page | Dzmitry Malyshau [:kvark] | P3 |
defect | 1528376 | High GPU usage on https://pressprogress.ca/jason-kenneys-labour-reforms-are-arbitrary-and-ridiculous-workers-rights-advocates-say/ | P3 | |
enhancement | 1529103 | Cache gradients in texture cache render tasks. | P3 | |
defect | 1550796 | Bad GPU performance on https://ultralig.ht/ with WebRender | P3 | |
defect | 1552318 | Scrolling is super laggy on https://templates.cartflows.com/ebook-landing/ | P3 | |
defect | 1579977 | Poor scrolling performance on Apple Music Beta | Nicolas Silva [:nical] | P3 |
8 Total; 8 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Too many render passes
Metabug: wr-render-passes
Note, it's likely that most of the bugs below would be fixed by caching the render passes (bucket above).
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1664478 | Blend modes and other effects on a single image force an extra intermediate target | P2 | |
defect | 1517926 | Bad performance on nested CSS keyframe animation | P3 | |
task | 1549734 | Reduce the resolution of some render tasks when going over GPU memory budget | P3 | |
defect | 1580864 | Janky scrolling with interactive map | P3 | |
enhancement | 1597326 | Avoid separate surfaces in WebRender if preserve-3d children don't intersect | P3 | |
enhancement | 1669840 | Improve opacity flattening | P3 |
6 Total; 6 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Overdraw
Metabug: 1613404
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
enhancement | 1485534 | Images that have alpha channels but are actually opaque go in the transparent pass | Patrick Walton (:pcwalton) | P2 |
defect | 1504590 | Slow 3d transform rendering on https://keithclark.co.uk/articles/pure-css-parallax-websites/demo3/ in debug mode | P3 | |
enhancement | 1558133 | Reducing overdraw with huge semi-transparent images | P3 | |
enhancement | 1597324 | Detect opaque split planes in WebRender | P3 | |
defect | 1457683 | servo moire demo is much slower in Firefox + WebRender than in Chrome | P5 | |
defect | 1674864 | Slow scrolling on https://stirringabyss.com/ | -- | |
enhancement | 1596634 | When blur filter is applied on a large area, it delays the full rendering | -- |
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
GPU times (others)
Metabug: wr-gpu-time
32 Total; 32 Open (100%); 0 Resolved (0%); 0 Verified (0%);
GPU Memory usage
Metabug: wr-gpu-memory
Useful prefs:
- See all profile counters starting with "Texture cache" in addition to "Created targets".
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
defect | 1660407 | GPU process uses huge amount of RAM and CPU | P2 | |
enhancement | 1475518 | Commit-space usage investigation | P3 | |
defect | 1614922 | GPU memory usage is (very) high when gfx.webrender.compositor is enabled | P3 |
3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Android
Metabug: wr-android-perf
12 Total; 12 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Software WebRender (SWGL)
Metabug: sw-wr-perf
46 Total; 46 Open (100%); 0 Resolved (0%); 0 Verified (0%);
See also:
- sw-wr-perf-opacity
- sw-wr-perf-nearest
- sw-wr-perf-alpha
- sw-wr-perf-mix-blend
- sw-wr-perf-clip-rect
- sw-wr-perf-clip-image
Tools
Metabug: wr-perf-tools
Type | ID | Summary | Assigned to | Priority |
---|---|---|---|---|
task | 1583884 | Show the number of blob tiles in existence in webrender's builtin profiler HUD | P3 | |
enhancement | 1641101 | Add support for profiling how often the same glyph has been evicted and re-rasterized | P3 | |
task | 1645021 | Reduce the cost of displaying HUD profiling tools in WebRender | P3 | |
task | 1678325 | Add a pref to force invalidation of picture tiles every frame | Nicolas Silva [:nical] | P3 |
4 Total; 4 Open (100%); 0 Resolved (0%); 0 Verified (0%);
General WebRender perf metabug
Metabug: wr-perf
During graphics triage, WebRender performance bugs are added as dependency to the wr-perf meta-bug. The next step is to replace the wr-perf dependency with one of the more specific meta-bugs above.
116 Total; 116 Open (100%); 0 Resolved (0%); 0 Verified (0%);