Flutter adds additional one frame touch latency compared to native
| Bad | Expected | | ------------- |:-------------:| | <video src="https://user-images.githubusercontent.com/96958/187072879-717668ac-a4fe-4e43-adc4-60d3774e5e1a.mov"> | <video src="https://user-images.githubusercontent.com/96958/187072886-6cbe0e23-78d5-4086-ad5f-756832ea4bb3.mov"> | Repository: https://github.com/knopp/flutter_scroll_overlay When touch event is received, instead of immediately beginning a frame Flutter waits for next vsync. But that skips an entire frame. By the time vsync comes, the frame should be already rendered and ready to go. But instead it has just began. On iOS touch events seem to be delivered within few milliseconds of the display link callback so there should be enough time. You can pause the "bad" video to see that during scrolling Flutter lags behind native by one frame exactly. The expected video is with quick and dirty engine modification that forces BeginFrame immediately on input event. The way vsync is implemented in Flutter might need some work. It should make sure that repaints are synchronized with display updates, but it shouldn't be causing additional latency.
Posted by knopp on Aug 28, 2022, 12:11 PM
Tags
Related issues
- [UPDATE NOW] PHP RCE Vulnerability (CVE-2026-109618 and CVE-2026-109619)
- Server requests and latency increased after upgrading from Next.js 15 to 16
- Leak of Geedge Networks internal documents (100,000+ from Jira, Confluence, GitLab)
- Can't download videos from YouTube on cobalt.tools
- `google_service_networking_connection` produce an error when trying to destroy the resource
- WebGPU-based renderer for the editor
Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments
github (Network)
[UPDATE NOW] PHP RCE Vulnerability (CVE-2026-109618 and CVE-2026-109619)
Server requests and latency increased after upgrading from Next.js 15 to 16
Leak of Geedge Networks internal documents (100,000+ from Jira, Confluence, GitLab)
Can't download videos from YouTube on cobalt.tools
`google_service_networking_connection` produce an error when trying to destroy the resource
WebGPU-based renderer for the editor
Zed downloads NodeJS binary and npm packages from Internet without user’s consent
FR: Allow custom domains for Tailscale Funnel
Flutter adds additional one frame touch latency compared to native
| Bad | Expected | | ------------- |:-------------:| | <video src="https://user-images.githubusercontent.com/96958/187072879-717668ac-a4fe-4e43-adc4-60d3774e5e1a.mov"> | <video src="https://user-images.githubusercontent.com/96958/187072886-6cbe0e23-78d5-4086-ad5f-756832ea4bb3.mov"> | Repository: https://github.com/knopp/flutter_scroll_overlay When touch event is received, instead of immediately beginning a frame Flutter waits for next vsync. But that skips an entire frame. By the time vsync comes, the frame should be already rendered and ready to go. But instead it has just began. On iOS touch events seem to be delivered within few milliseconds of the display link callback so there should be enough time. You can pause the "bad" video to see that during scrolling Flutter lags behind native by one frame exactly. The expected video is with quick and dirty engine modification that forces BeginFrame immediately on input event. The way vsync is implemented in Flutter might need some work. It should make sure that repaints are synchronized with display updates, but it shouldn't be causing additional latency.
Comments (0)
No comments yet. Start the discussion.