Dynamic double buffering fails to detect inertial dash scrolling as slow; and stutters instead of scaling up to triple buffers.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Medium
|
Daniel van Vugt | ||
mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
qtmir (Ubuntu) |
Opinion
|
Medium
|
Unassigned |
Bug Description
Dynamic double buffering fails to detect inertial dash scrolling as slow; and stutters...
[1437388267.960199] perf: Scopes: 37.69 FPS, render time 17.79ms, buffer lag 34.87ms (2 buffers)
[1437388268.985012] perf: Scopes: 30.27 FPS, render time 25.22ms, buffer lag 40.29ms (2 buffers)
[1437388269.993894] perf: Scopes: 31.74 FPS, render time 23.42ms, buffer lag 40.46ms (2 buffers)
[1437388271.002470] perf: Scopes: 36.70 FPS, render time 19.13ms, buffer lag 35.59ms (2 buffers)
[1437388272.021942] perf: Scopes: 44.16 FPS, render time 15.96ms, buffer lag 29.12ms (2 buffers)
[1437388273.043734] perf: Scopes: 40.15 FPS, render time 17.85ms, buffer lag 31.90ms (2 buffers)
whereas forcing triple buffers it runs more smoothly:
[1437389981.872839] perf: Scopes: 57.71 FPS, render time 13.86ms, buffer lag 38.31ms (3 buffers)
[1437389982.877556] perf: Scopes: 56.77 FPS, render time 15.72ms, buffer lag 37.31ms (3 buffers)
[1437389983.887702] perf: Scopes: 57.42 FPS, render time 13.53ms, buffer lag 38.76ms (3 buffers)
[1437389984.894372] perf: Scopes: 55.66 FPS, render time 16.02ms, buffer lag 38.12ms (3 buffers)
[1437389985.912328] perf: Scopes: 60.96 FPS, render time 13.72ms, buffer lag 34.99ms (3 buffers)
[1437389986.929857] perf: Scopes: 59.98 FPS, render time 14.49ms, buffer lag 35.67ms (3 buffers)
You can see that unity8-dash is right on the edge here.
Surprisingly the problem is not detectable if you keep your finger on the screen. Then the dash actually renders faster. The problem only seems to happen with inertial scrolling; when you fling the surface and lift your finger off.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Mir CI Bot: Approve (continuous-integration)
- Alan Griffiths: Approve
- Mir development team: Pending requested
-
Diff: 245 lines (+142/-9)3 files modifiedsrc/server/compositor/buffer_queue.cpp (+24/-4)
src/server/compositor/buffer_queue.h (+1/-0)
tests/unit-tests/compositor/test_buffer_queue.cpp (+117/-5)
- Alberto Aguirre (community): Approve
- Alan Griffiths: Needs Information
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 85 lines (+12/-6)3 files modifiedsrc/server/compositor/buffer_queue.cpp (+1/-1)
tests/integration-tests/test_buffer_scheduling.cpp (+6/-2)
tests/unit-tests/compositor/test_buffer_queue.cpp (+5/-3)
tags: | added: ddb-missed-0.14 |
Changed in mir: | |
milestone: | 0.15.0 → 0.16.0 |
Changed in mir (Ubuntu): | |
status: | New → Invalid |
Changed in mir: | |
milestone: | 0.16.0 → 0.17.0 |
Changed in mir: | |
milestone: | 0.17.0 → 0.18.0 |
Changed in mir: | |
milestone: | 0.18.0 → 0.19.0 |
Changed in mir: | |
milestone: | 0.19.0 → 0.20.0 |
Changed in mir: | |
milestone: | 0.20.0 → none |
Changed in mir: | |
milestone: | none → 0.20.0 |
Changed in mir: | |
milestone: | 0.20.0 → 0.19.0 |
no longer affects: | qtmir |
Silly me. Mir seems to be behaving correctly, although I can think of some improvements. The real issue here is that dynamic double buffering relies on the compositor (over)scheduling enough frames for the performance detection to work. That means calling: :compositor: :Scene: :frames_ pending( )
mir:
and compositing that many frames as a _minimum_. We just haven't added support for the algorithm fully to qtmir's compositor code yet.