Repository navigation
Conversation
…287) Measured in the perf harness (headless Chrome, GPU, CPU 4x, real pen input through CDP at 240 Hz): every wet paint already lands in the frame its move was dispatched in, sample to paint 3-5 ms, to the next frame about 10 ms. Drawing in the handler or from pointerrawupdate cannot reach an earlier frame. What waited was the stroke start: the pen-down painted nothing until the first move, so a pen resting 20 ms showed its first ink ~30 ms after landing. It now schedules the wet paint (30 -> 10 ms there; on the iPad over the bridge, first frame 35-41 -> 17-31 ms), except while a first pressure or tilt reading could still rewrite the start, so the dot never changes once drawn. The diagnostics HUD gets a line for comparing builds on a device: `lat ink 6/9ms frame 16/20ms in 242Hz 1.7n/ev desync=off` (median/p95 of sample to wet paint and to the next frame, the pen's sample rate and samples per event, and whether the low-latency canvas was granted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #287 (latency on a Galaxy Tab S8 Ultra, against the Handwriting plugin).
What changed
lat ink 6/9ms frame 16/20ms in 242Hz 1.7n/ev desync=offink: median / 95th percentile, from the newest pen sample (its event timestamp) to the end of the wet paint that shows it.frame: the same, to the start of the next frame, which is about when the paint reaches the glass. The compositor and the panel add more that no page can see.in: samples a second from the pen, and samples per event.desync:on(granted),asked(asked for and silently refused),off(setting off).Measured
Perf harness (headless Chrome, GPU on, CPU 4x, real pen input through CDP at 240 Hz, 12 strokes a run):
pointerrawupdateas the Handwriting plugin does, cannot reach an earlier frame without a front buffer.desynchronizedon vs off: no difference in headless Chrome. It is granted there, but there is no real display to show the effect.iPad over the bridge (iPad Air 5, 60 Hz; synthetic pen events on the installed 2.10.0 with the change patched in at runtime; a throwaway notebook, trashed afterwards):
desynchronizedon the wet canvas.Unproven on Android
desynchronized: ours is on by default (the "Desynchronized canvas" setting). The Handwriting plugin turned it off after measuring it on Chromium (a 120 Hz Surface): with it on, moves came at 25–40 Hz instead of ~115, and ink was 25–37 ms old at present instead of ~7. According to Chromium's blink-dev thread, outside ChromeOS the hint only decouples input from the compositor frame; it does not give a front buffer. It may be costing us the same on Android. Not changed here; that is what to A/B.How to test (Android)
lat …line at the bottom of the overlay (a screenshot is enough).latline again. Note which one feels faster.inkandframefigures should match mid-stroke; the stroke start should feel quicker on this branch.Gates: lint, lint:review, lint:css, typecheck, test, build all green locally.
🤖 Generated with Claude Code