Repository navigation
Conversation
…xt sweep Stacks OctoSense-org/makepad#128 on the pinned makepad (d653bc44): - The Choreographer beat carries its expected presentation time (API 33+). - EGL frame timestamps report each frame's display time. - When two frames in a row reach the screen half a refresh late while a finger is down, one beat is left unpainted so the extra queued frame drains. In the phone's All apps list, a drag stops trailing the finger by a frame or two after one slow frame: drags at the shortest delay rose from 52% to 84% on a OnePlus 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kepad #128) Restacks makepad-android-buffer-stuffing.patch on makepad #128's second commit: a refresh without a new frame (an unpainted beat, or an idle app's stopped beats) drains the queue, so frames painted before one never arm a skip. Without it, a stuffed coast's last frames, read back at the next gesture's first swap, could drop that gesture's second beat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#548 stacked makepad-apple-ui-font.patch on the same lock lines. The buffer-stuffing patch now follows it (stacked entry and product fix after #548's) and applies unchanged; the lock tree is regenerated from the whole stack: 9d9aef6e, which differs from main's 90b364c1 only in this patch's Android files. `tools/setup.py --check --cargo` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's lock now stacks makepad-map-texture-depth.patch as the 38th patch (#435). The Android buffer-stuffing patch follows it as the 39th, unchanged (sha 7f87b527); it touches no file the map patch does. The makepad tree, replayed over the whole stack with git apply --index, is fcd2a327. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#554 stacked makepad-finance-seed.patch as the 39th patch. The Android buffer-stuffing patch follows it as the 40th, unchanged (sha 7f87b527); the two touch disjoint files. The makepad tree, replayed over the whole stack with git apply --index, is a9c02164. `tools/setup.py --check --cargo` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Why
A performance soak of the phone's All apps list on a OnePlus 6 (Android 15, 60 Hz) found that scrolling feels slow because of lag, not frame rate. The soak ran main 8b98596 as a test package for 60 minutes: 960 scripted drags, flings and flicks with 8 ms touch injection, measured against SurfaceFlinger present times and
phone.frames.Frame rate: a median of 60 fps, with flat memory and no crashes.
Lag: within a drag, the delay from finger to screen is constant, but it falls into one of three groups:
The first drag after opening All apps is always in the slow groups.
Cause: buffer stuffing in Makepad's Android frame loop. A frame takes about 12 ms from the vsync beat to the queue, against a latch at about 16 ms. One slow frame, usually the first after idle, misses the latch, and every later frame waits one refresh in the queue until the app goes idle. Instrumented runs found 55 such events and no recoveries.
What
This stacks OctoSense-org/makepad#128 on the pinned Makepad (d653bc44) as
tools/runtime-patches/makepad-android-buffer-stuffing.patch, and updatesruntime-patches.lock.jsonwith the stacked entry, its sha256, the tree and aproduct_fixesline.VsyncCallbackFrameData.setprop debug.makepad.stuffing offdisables it.The next Makepad sweep drops this patch once #128 is merged upstream into our fork's
main.Device results
OnePlus 6, a Home test package built from this branch (
dev.makepad.octosense.scrollfinal, 0833dfe). Production Home was not replaced. All apps, recovery off or on through the property, two interleaved rounds of 5 minutes each:The extra dropped frames are the stuffed queue's lost cushion. A slow frame now shows as one repeated frame, mostly at the start of a drag and in its coast; fling coasts are unchanged. The follow-up that removes both is cheaper frames: GL encode is 5 ms of the 12.
The table above is from 0833dfe. 152001a then armed the detector only while a finger is down. 4c04edf stacks #128's second commit. A refresh without a new frame drains the queue, so frames painted before one never arm a skip. Re-checked with a test package built from 4c04edf (
dev.makepad.octosense.scrollfinal2):Checks
tools/ci-local.sh --linux-host --offload) passed on 4c04edf in 17m43s. GitHub's embedded-browser (Windows) check passed on the same head.python3 tools/setup.py --check --cargopasses.cargo checkis clean for this change, andmakepad-platformlib tests pass (253).🤖 Generated with Claude Code