Bug 235592

Summary: [Cocoa] rVFC() callbacks have up to 60ms extra latency
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: NEW ---    
Severity: Normal CC: dino, eric.carlson, jean-yves.avenard, mjs, peng.liu6, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dino: review+

Description Jer Noble 2022-01-25 08:59:01 PST
[Cocoa] rVFC() callbacks have up to 16ms extra latency
Comment 1 Radar WebKit Bug Importer 2022-01-25 09:15:47 PST
<rdar://problem/88027149>
Comment 2 Jer Noble 2022-01-25 09:15:57 PST
Correction: 60ms extra latency.
Comment 3 Jer Noble 2022-01-25 09:17:51 PST
Created attachment 449934 [details]
Patch
Comment 4 Jer Noble 2022-01-26 13:52:55 PST
Unfortunately, Performance testing shows this patch to have a negligible effect on latency. It appears latency is more greatly determined by when in a display refresh cycle the frame becomes available.  The good news is that even without this patch, frame display latencies are in the order of 9-16ms.
Comment 5 Maciej Stachowiak 2022-01-31 10:43:15 PST
Is it 60ms or 9-16ms? The former seems fatal to use of the feature, the latter seems maybe ok?
Comment 6 Jer Noble 2022-01-31 11:59:42 PST
(In reply to Maciej Stachowiak from comment #5)
> Is it 60ms or 9-16ms? The former seems fatal to use of the feature, the
> latter seems maybe ok?

Potentially 60ms, because that's the timer which AVPlayerItemVideoOutput uses to purge samples. In practice, I've never seen it higher than 16ms on this particular machine.