fix(cursor): system cursor swaps off the tick thread (#363) - #364
Merged
Merged
Conversation
…GHEST (#363) The zoom-out restore (SPI_SETCURSORS scheme reload, 8 ms median, up to 90 ms under load) and the blank (14 SetSystemCursor) ran on the tick thread and froze the 1x landing and zoom-in frames. They now run in order on a worker; the repaint nudge follows the restore there. restoreSync() for the input-panel clip nudge and shutdown. The txPace=2 composite pulse thread runs at HIGHEST so a build no longer starves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
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.
Closes #363.
The hitch recorder (#361) traced the zoom-in and zoom-out stutter to the system cursor swaps on the tick thread:
SPI_SETCURSORSreloads the whole cursor scheme from disk. 8 ms median, up to 90 ms under load. It froze the 1x landing frame.SetSystemCursorcalls, about 10 ms (busy in cursor).Change
CursorBlankerruns its swaps in order on aWind cursor swapsworker thread, at above normal priority.restoreSync()covers the input-panel clip nudge and shutdown. The crash filter is unchanged and still restores directly.pulse-thread-late).Verified on the signed UIAccess build
build.bat test: 569/569 pass.build.batbuilds clean.Pointer check: 40 zoom cycles plus 5 in/out storms.
Zoom-out teardown: 140 zoom-outs.
busy in cursorand zoom-outbusy in activatehitches are gone.Still open (follow-up)
loop-otherbetween ticks right after a zoom-out. This is likely the message pump reacting to the cursor change, and needs a pump span.blocked in activate, 11 to 14 ms: DWM entering magnification.🤖 Generated with Claude Code
https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG