Platform/GFX/perf triage
The page contains a breakdown of performance related bugs and tasks for WebRender.
See also, the graphics perf bugs that come out of the performance team's triage process
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).
High priority bugs
Metabug: wr-perf-p1
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Alternate query using performance flag set to P1:
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
CPU time
Frame building
useful prefs:
- gfx.webrender.debug.profiler-ui: "Frame times"
Metabug: wr-frame-building-perf
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
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Scene building
Metabug: wr-scene-building-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Renderer (Driver & ANGLE overhead)
Metabug: wr-renderer-perf
Useful prefs:
- gfx.webrender.debug.profiler-ui: "Frame stats,#Renderer,Renderer graphs"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Texture/Buffer uploads
Metabug: texture-upload-perf
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:
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Batching
Metabug: wr-batching-perf
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"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Picture Caching
Metabug: picture-cache-perf
See also: incremental-perf
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#Rendered picture tiles, ,Picture cache slices,Picture tiles,Picture tiles mem"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
DisplayList building
Metabug: wr-displaylist-perf
Useful prefs:
- gfx.webrender.debug.profiler-ui: "Transaction times"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Blob image rasterization
Metabug: wr-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"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
SVG filters metabug: wr-svg-filter-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
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"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Scheduling
Metabug: frame-scheduling
Useful prefs:
- gfx.webrender.debug.profiler-ui: "#Content send,#API send"
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Vsync
Metabug: vsync
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Preserve-3d
Metabug: bug 1795885
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
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
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
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).
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Overdraw
Metabug: 1613404
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
GPU times (others)
Metabug: wr-gpu-time
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
GPU Memory usage
Metabug: wr-gpu-memory
Useful prefs:
- See all profile counters starting with "Texture cache" in addition to "Created targets".
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Video playback
Metabug: video-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Power usage
Metabug: gfx-power-usage
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Android
Metabug: wr-android-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Linux
Metabug: wr-linux-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Software WebRender (SWGL)
Metabug: sw-wr-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
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
Canvas 2D
Metabug: canvas-perf
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Tools
Metabug: wr-perf-tools
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
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.
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1
Other meta-bugs:
- wr-low-end-perf - wr-perf-graveyard - speedometer 3