Editor: every text deletion causes one 46-56 ms frame ~70 ms after the key #984

Closed
opened 2026-11-06 09:34:36 +00:00 by kayg · 2 comments
Owner

Found while measuring the toast morph (#976 lane, comment on #922 / 81986), on origin/dev 7a9bd54eb, WebKit 1440, Mac VM, interleaved.

Finding: every text DELETION in the editor produces exactly ONE long frame of 46-56 ms (once 88 ms), about 70-85 ms after the keypress. 12 of 12 cases, for Backspace on a selected word and for the cmd+shift+K block delete.

  • typing a character: 0 such frames; arrow key: 1; idle control: 0-1.
  • No JS callback over 8 ms runs in that frame, so it is style/layout/paint or a long task the profiler missed.

Plan: find the cause with a Safari.app Web Inspector timeline plus performance.marks on the delete path; fix at the root (mapped/incremental work, idle scheduling, smaller invalidation), no behaviour change; typing must stay as fast.

Gates: Mac VM frames interleaved vs dev: 0 frames >= 50 ms over 30 deletes, typing/idle unchanged; typing latency flat on dev-01; editor + web unit tests; editor Playwright specs Chromium (dev-01) and WebKit (dev-02) at 1440 and 390; first paint <= dev.

Evidence will be posted as comments here.

Found while measuring the toast morph (#976 lane, comment on #922 / 81986), on origin/dev `7a9bd54eb`, WebKit 1440, Mac VM, interleaved. **Finding:** every text DELETION in the editor produces exactly ONE long frame of 46-56 ms (once 88 ms), about 70-85 ms after the keypress. 12 of 12 cases, for Backspace on a selected word and for the cmd+shift+K block delete. - typing a character: 0 such frames; arrow key: 1; idle control: 0-1. - No JS callback over 8 ms runs in that frame, so it is style/layout/paint or a long task the profiler missed. **Plan:** find the cause with a Safari.app Web Inspector timeline plus performance.marks on the delete path; fix at the root (mapped/incremental work, idle scheduling, smaller invalidation), no behaviour change; typing must stay as fast. **Gates:** Mac VM frames interleaved vs dev: 0 frames >= 50 ms over 30 deletes, typing/idle unchanged; typing latency flat on dev-01; editor + web unit tests; editor Playwright specs Chromium (dev-01) and WebKit (dev-02) at 1440 and 390; first paint <= dev. Evidence will be posted as comments here.
Author
Owner

Root cause found: live filter: blur(6px) on the drifting cloud canvases (elimination table in the PR). PR #987.

Root cause found: live `filter: blur(6px)` on the drifting cloud canvases (elimination table in the PR). PR #987.
Author
Owner

Completed by #987, landed in dev via 71653a7dd7. Closing after verifying the fixing PR head is contained in origin/dev.

Completed by #987, landed in dev via 71653a7dd76cbb995f3b24a50c79d34dec50889c. Closing after verifying the fixing PR head is contained in origin/dev.
kayg closed this issue 2026-11-07 17:54:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#984
No description provided.