[Webkit-unassigned] [Bug 217742] New: HIDGamepadProvider adds an extra 50ms to all inputs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 14 17:40:31 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=217742

            Bug ID: 217742
           Summary: HIDGamepadProvider adds an extra 50ms to all inputs
           Product: WebKit
           Version: Safari 14
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: juberti at google.com

When measuring Safari's button-to-photon latency with html5gamepad.com, I noticed that Safari has roughly double the latency of Chrome for wired USB gamepads (108ms vs 56ms).

I investigated this a bit and found this code in HIDGamepadProvider which I believe accounts for the difference:
https://github.com/WebKit/webkit/blob/950143da027e80924b4bb86defa8a3f21fd3fb1e/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp#L39

50ms is enormous latency for a gamepad - gaming mice charge a premium in order to deliver ~10ms latency savings.

Could this delay be reduced or eliminated? The rationale around this code isn't entirely clear to me:

    // This isActive check is necessary as we want to delay input notifications from the time of the first input,
    // and not push the notification out on every subsequent input.
    if (!m_inputNotificationTimer.isActive())
        m_inputNotificationTimer.startOneShot(inputNotificationDelay);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201015/64be09e7/attachment.htm>


More information about the webkit-unassigned mailing list