-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Description
I'm experiencing significant input latency when using egui on Android, directly related to the compatibility issue described in #7478. As noted in that issue, the SurfaceView + dispatchEvent approach has fundamental incompatibilities with egui's event processing model, leading to unavoidable latency.
Problem Analysis
- Thread Separation:
- Android touch/input events are dispatched exclusively on the MainLooper (UI thread)
- OpenGL/egui rendering must happen in a separate thread (can't block UI thread)
- This creates an inherent thread synchronization delay
- Observed Symptoms:
- Touch events feel "laggy" or "sluggish"
- Visual feedback delayed by 1-2 frames(16~32ms / 60fps)
- Event processing backlog during high-frequency touch events
# Simplified current flow
Android UI Thread (MainLooper) → JNI Bridge → Rust Event Queue → Rendering ThreadRoot Causes
- Mandatory Thread Separation: Android's architecture requires UI operations on MainLooper, but rendering can't block it.
- Lack of Frame Synchronization: No coordination between event delivery and frame boundaries.
Request
We need to address the fundamental architectural issue raised in #7478
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels