Closed Bug 1678783 (sw-wr-perf-linear-repeat) Opened 4 years ago Closed 4 years ago

Janking while doing touchpad scroll on wiki.js.org (sw-wr)

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox85 --- wontfix
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- fixed

People

(Reporter: yoasif, Assigned: lsalzman)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

(Keywords: nightly-community)

Attachments

(2 files)

Attached file Wiki.js (11_20_2020 9_27_51 PM).html (deleted) —

Scroll down https://wiki.js.org/ using touchpad.

Profile: https://share.firefox.dev/35Q6yun

There's a big chunk in NtGdiDdDDIWaitForSynchronizationObjectFromCpu

The shader time is mostly in:
brush_image_ALPHA_PASS_ANTIALIASING_REPETITION_TEXTURE_2D_frag::swgl_drawSpanRGBA8,
brush_linear_gradient_ALPHA_PASS_frag::brush_fs
cs_clip_rectangle_FAST_PATH_frag::run

Asif, can you try toggling gfx.webrender.software.d3d11 and see whether it works better with true or false?

Flags: needinfo?(yoasif)

Jeff, it works a bit better when gfx.webrender.software.d3d11 is false.

Flags: needinfo?(yoasif)
Severity: -- → S4
Priority: -- → P3

Non-idle percentages as of e5e734f4fc19 (2021-1-21):

  • 28% brush_image_ALPHA_PASS_ANTIALIASING_REPETITION_TEXTURE_2D_frag
  • 16% cs_border_solid_frag
  • 9% draw_quad (can't tell which shader, or which call from draw_texture_cache_target)
  • 7% _memmove_avx_unaligned_erms < scale_blit < Composite
  • 6% brush_solid_ALPHA_PASS_ANTIALIASING_frag
  • 5% cs_clip_rectangle

This spends almost all its time in the linear repeat fast-path set up in bug 1686244. This seems due to the scrolling image background it has lower on the page.

Given that we do at least try to optimize that case, I would almost close this bug, however, we might be able to do a little bit better here in detecting if the section of texture we're drawing actually has to repeat or not and invoking the non-repeat fast-paths for it.

Alias: sw-wr-perf-linear-repeat
Blocks: 1690636

Bug 1700206 cleaned up the repeat handling, for the tangential reason of supporting tile repeat without regressing performance, to at least try to go through the normal linear sampling fallback when possible, which should yield a little bit of a speed boost for this case over the previous implementation of repeat sampling.

Blocks: 1700206
No longer blocks: 1700206
Depends on: 1700206
Blocks: 1700921

This reorganizes the blendTextureLinear code so that linear-repeat filtering
can reuse the linear filtering fast-paths. Otherwise, linear-repeat filtering
would previously only use the linear filtering fallback, when some patterns
like repeating background images are easily accelerated by these extra fast-paths.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcc9ca0ad46e Reuse linear filtering fast-paths for linear-repeat filtering. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Regressions: 1703893
Regressions: 1705836
Depends on: 1711694
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: