Skip to content

iOS SmoothPointerDataDispatcher adds an extra frame of pointer latency #190917

Closed as duplicate

Description

@MTtankkeo

Description

On iOS, SmoothPointerDataDispatcher may hold the latest pointer packet until VSync to smooth irregular input delivery.

However, the pending packet is currently released from a secondary VSync callback, after the primary frame callback for that VSync has already been scheduled.

As a result, pointer data synchronized to VSync N cannot affect the frame associated with VSync N. If processing that pointer data requests a frame, it instead waits for VSync N+1.

This adds an additional display interval to the input-to-render path and is noticeable as increased pointer/scroll latency on iOS.

Current behavior

VSync N
  → BeginFrame N
  → release pending pointer
  → pointer processing requests a frame
  → wait for VSync N+1

Activity

  1. added
    platform-iosiOS applications specifically
    engineflutter/engine related. See also e: labels.
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    team-iosOwned by iOS platform team
    on Aug 11, 2026
  2. mbcorona commented on Aug 11, 2026

    @mbcorona
    Member

    Thanks for the report and Pr linked @MTtankkeo .
    Routing to the iOS team for evaluation.

  3. cbracken commented on Aug 13, 2026

    @cbracken
    Member

    /cc @cbracken

    I've got a (probably pretty stale) patch for this that I wrote back in April to solve #110431, which this issue may be a dupe of. I'll compare the two issues. (iOS triage meeting)

  4. self-assigned this
    on Aug 13, 2026
  5. added
    P2Important issues not at the top of the work list
    on Aug 13, 2026
  6. cbracken commented on Aug 17, 2026

    @cbracken
    Member

    @MTtankkeo before I get started reviewing your patch, can you take a look at #110431 and let me know if this is a dupe of that bug? To me this looks related but separate at first look.

    As mentioned, back in April I started on a prototype patch for this, but like yours it touches some very sensitive threading/synchronisation code in the embedder and needs a lot of time to make sure that (a) it's correct and (b) it won't cause problems with the current work migrating the embedder towards the embedder API.

    @knopp and I both took a quick initial look at your patch last week, but just a quick heads-up that due to the complexity of that code, I expect review/experimentation with it to take some time.

  7. cbracken commented on Aug 17, 2026

    @cbracken
    Member

    Okay looking at this a bit more; this is actually separate. SmoothPointerDataDispatcher is tacking on an extra frame of latency since we hold the incoming packet and then release on a secondary vsync callback after BeginFrame was already queued.

    Then we hit #110431.

    Alright let me dig into SmoothPointerDataDispatcher. A lot of the detailed history/rationale for that is internal and tangentially Fuchsia-related. I'd like to understand whether any of the issues that led to it are even still valid int the current post-thread-merging world.

  8. jmagman commented on Aug 21, 2026

    @jmagman
    Member

    Thanks for your thorough investigation! We'll keep looking into this issue here #110431 (309 👍) and are actively working on a fix. Please follow along there for updates!

  9. locked as resolved and limited conversation to collaborators on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions