fix(ws): Give back the depth a paced path took once it stays on time
An x264 session that took its own reference depth for its page's paced
path kept it until the capture next started, so a link that narrowed
once had the stream encoded and decoded against eight references from
then on. A page decoding at its limit pays for that: Firefox showing
2560x1600 on a loaded host, at 42 of 60 FPS, drew frames 75 ms later at
eight references than at one (275 against 200 ms on LAN, three runs
each). Firefox keeping up, at 1280x800 and 60 FPS, showed no difference
at any depth from one to eight.
The depth now goes back once the page's path has stayed on time for ten
seconds, on the key frame x264's reopen codes at that quiet moment,
where one page streams the display. Each return doubles the wait, and
past 80 s the depth stays, so a path that narrows again and again
settles deep after four returns at most.
Interleaved A/B against a84dce3, host load 50 to 60, four runs each;
FPS, worst second, p50:
- Animation 5/60: Chromium 24.6 -> 47.5 FPS, 8.9 -> 33.8, 124 -> 86 ms;
native 30.4 -> 58.5, 10.1 -> 50.2, 98 -> 66 ms, key frames received
448 -> 3. - Animation 10/40: Chromium 48.6 -> 48.0, 37.8 -> 38.8, 78 -> 78 ms;
native 56.7 -> 59.2, 38.8 -> 52.3, 56 -> 60 ms. - Scroll 5/60: Chromium 45.1 -> 47.4, 22.2 -> 35.8, 125 -> 128 ms;
native 53.5 -> 53.9, 26.7 -> 39.2, 104 -> 122 ms, runs of both on
16 ms steps. - Firefox on LAN: 34.1 -> 33.9 FPS, 245 -> 244 ms; nothing deepens.
- A link at 5 Mbit/s for 20 s, then 100, read 12 to 32 s after it
widened (three runs; main, the depth kept, the depth given back):
Chromium 70, 68, 67 ms; Firefox 376, 370, 363 ms. The depth went back
in every run. - 90 s at 5/60 and 10/40: one or two returns, two to four key frames
past the first, worst second 37.7 to 56.2 FPS. - congestion_step websockets (two runs each) and cc_start_rate,
reference_invalidation, slow_page, ws_cut, ack_heartbeat,
software_h264, multi_controller and video_drop_recovery pass.