Information

Low-latency input events in workers
  • Past
  • Confirmed
  • Breakout Sessions

Meeting

Event details

Date:
Coordinated Universal Time
Status:
Confirmed
Location:
Gamba
Participants:
Shawn C., Marcos Caceres, Arthur Coleman, Wei Ding, Robert Flack, Reilly Grant, Enrico Morisi, Matthew Reynolds, Adam Scott, Carl Smith, Rachel Yager
Big meeting:
W3C Breakouts Day 2024 (Calendar)

The following proposal is based on this email and related discussion in the Gamepad API repo. Posted here as Chair of the WebApps WG.

This proposal for a W3C breakout session aims to address a critical limitation of the web as a platform for applications requiring low-latency response to user inputs. Despite technological advancements, the web's current input handling mechanisms are inadequate for such applications due to their dependence on the main thread.

User input APIs, which include keyboard, pointer, gamepad, HID, USB, MIDI, Bluetooth, and serial interfaces, are currently designed to register handlers on the main thread. This design results in inconsistent and unreliable response times, as the main thread is frequently occupied with other processes. This limitation adversely affects a broad range of applications, particularly those requiring precise user inputs, such as certain video games, Digital Audio Workstations (DAWs), synthesizers, and art programs that rely on touch gestures.

While incorporating timestamps in input APIs could offer some improvement, a more effective solution is to allow these APIs to be accessible from Web Workers. This change would significantly reduce input latency issues. Some APIs are already making progress in this direction, but others, especially those tied to the DOM API like keyboard and pointer events, face more complex challenges due to their inherent link to the main thread.

This issue, recently discussed with folks involved with the Gamepad API, highlights the need for a comprehensive approach that encompasses various APIs. Therefore, this session proposal seeks to gather community input and collaboration to explore and develop solutions that enhance the web's ability to handle user inputs with the necessary low latency. This effort requires a broad perspective and collective action, addressing the current limitations and identifying feasible paths for improvement in web application responsiveness.

Agenda

Chairs:
Marcos Caceres, Reilly Grant, Matthew Reynolds, Carl Smith

Description:
The following proposal is based on this email and related discussion in the Gamepad API repo. Posted here as Chair of the WebApps WG.

This proposal for a W3C breakout session aims to address a critical limitation of the web as a platform for applications requiring low-latency response to user inputs. Despite technological advancements, the web's current input handling mechanisms are inadequate for such applications due to their dependence on the main thread.

User input APIs, which include keyboard, pointer, gamepad, HID, USB, MIDI, Bluetooth, and serial interfaces, are currently designed to register handlers on the main thread. This design results in inconsistent and unreliable response times, as the main thread is frequently occupied with other processes. This limitation adversely affects a broad range of applications, particularly those requiring precise user inputs, such as certain video games, Digital Audio Workstations (DAWs), synthesizers, and art programs that rely on touch gestures.

While incorporating timestamps in input APIs could offer some improvement, a more effective solution is to allow these APIs to be accessible from Web Workers. This change would significantly reduce input latency issues. Some APIs are already making progress in this direction, but others, especially those tied to the DOM API like keyboard and pointer events, face more complex challenges due to their inherent link to the main thread.

This issue, recently discussed with folks involved with the Gamepad API, highlights the need for a comprehensive approach that encompasses various APIs. Therefore, this session proposal seeks to gather community input and collaboration to explore and develop solutions that enhance the web's ability to handle user inputs with the necessary low latency. This effort requires a broad perspective and collective action, addressing the current limitations and identifying feasible paths for improvement in web application responsiveness.

Goal(s):
See if it's feasible to route some HID events to workers

Materials:

Export options

Personal Links

Please log in to export this event with all the information you have access to.

Public Links

The following links do not contain any sensitive information and can be shared publicly.

Feedback

Report feedback and issues on GitHub.