Skip to content

Audit and Optimize Performance for Low-Latency Input Handling #10

@ruffsl

Description

@ruffsl

Summary:
While CtrlAssist currently uses gilrs.next_event_blocking() for input event handling, it's important to establish a baseline for introduced input latency and optimize for low-latency performance. Even if latency is not human-perceptible, benchmarking and consistency are key for future development and refactoring.

Expected Behavior:
Virtual device input latency should be minimal and consistent across all muxing modes. Performance should be benchmarked and monitored to avoid regressions and guide future improvements (e.g., async support, multithreading, GUI integration).

Current Behavior:
No formal benchmarks or test harness exist to measure input latency or performance across muxing modes. Latency characteristics are not well documented or tested.

Suggested Solution:

  • Develop a test harness to benchmark input latency for each muxing mode individually.
  • Document baseline latency and performance characteristics.
  • Use benchmarks to guide refactoring and feature additions (e.g., async support, multiple virtual controllers, multithreading, GUI integration).
  • Monitor for regressions and ensure consistent low-latency performance as the project evolves.

Notes:

  • Consider using Rust benchmarking tools or custom test rigs for input latency measurement.
  • Performance optimization is especially important for accessibility and competitive gaming scenarios.
  • For hardware in the loop testing, checkout Gamepadla for characterizing latency and input lag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions