Press engine: the drag lift costs one 20-34 ms frame in every list (Money, Tasks, Mail) #1058

Open
opened 2026-11-10 11:54:56 +00:00 by kayg · 0 comments
Owner

Found while checking the Money drag (#1031): one frame of 48 ms showed up in a long scripted category drag at 1440 (WebKit, Mac VM, real GPU, 60 Hz so one frame = 16.7 ms). I measured the LIFT on the shared press engine (press/drag.svelte.ts, Drag.prime/lift) across lists, 5 interleaved runs each at 1440 (mouse down, 14 px move, 450 ms of rAF deltas; max frame per run, ms):

list (row) runs (max frame, ms)
Money category row (arrange/RowActions) 27, 20, 25, 34, 28 (earlier session: 22, 25, 21, 31, 23 and 25, 22, 26, 24, 19)
Money view row (AppTree arrange) 24, 20, 20, 23, 23
Tasks list row 24, 19, 28, 23, 28
Mail list row 30, 28, 25, 27, 32

Reading: every list on the engine has one slow frame at the lift of about 20 to 34 ms (1.5 to 2 frames), the frame that copies the row (lookalike) and adds the shadow layer. Money is in the same range as Tasks and Mail, so it is the engine, not Money's rows. The 48 ms in the long drag did not reproduce in 25 lift runs (max 34), so it is a rare spike, not the lift itself.
Not measured: the Notes list (my script could not reach its rows in the float layout) and Contacts. Whoever picks this up should add them.
Idea (not tried): build the ghost earlier (prime() is already called a moment into the hold, so the cost is probably the first layout of the clone and its will-change: transform layer); a lighter copy (no subtree for rows with thumbnails or bars) or a cached ghost per row would cut it.
Measured on branch feat/money-round; the measuring spec is throwaway and not committed.

Found while checking the Money drag (#1031): one frame of 48 ms showed up in a long scripted category drag at 1440 (WebKit, Mac VM, real GPU, 60 Hz so one frame = 16.7 ms). I measured the LIFT on the shared press engine (`press/drag.svelte.ts`, `Drag.prime/lift`) across lists, 5 interleaved runs each at 1440 (mouse down, 14 px move, 450 ms of rAF deltas; max frame per run, ms): | list (row) | runs (max frame, ms) | |---|---| | Money category row (`arrange`/RowActions) | 27, 20, 25, 34, 28 (earlier session: 22, 25, 21, 31, 23 and 25, 22, 26, 24, 19) | | Money view row (AppTree `arrange`) | 24, 20, 20, 23, 23 | | Tasks list row | 24, 19, 28, 23, 28 | | Mail list row | 30, 28, 25, 27, 32 | Reading: every list on the engine has one slow frame at the lift of about 20 to 34 ms (1.5 to 2 frames), the frame that copies the row (`lookalike`) and adds the shadow layer. Money is in the same range as Tasks and Mail, so it is the engine, not Money's rows. The 48 ms in the long drag did not reproduce in 25 lift runs (max 34), so it is a rare spike, not the lift itself. Not measured: the Notes list (my script could not reach its rows in the float layout) and Contacts. Whoever picks this up should add them. Idea (not tried): build the ghost earlier (`prime()` is already called a moment into the hold, so the cost is probably the first layout of the clone and its `will-change: transform` layer); a lighter copy (no subtree for rows with thumbnails or bars) or a cached ghost per row would cut it. Measured on branch `feat/money-round`; the measuring spec is throwaway and not committed.
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#1058
No description provided.