Investigate consolidating WASM transfer calls
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript, wasm
- Domain
- performance
Research direction
Profile the render-frame calls to Clay_SetPointerState, Clay_UpdateScrollContainers, reduce, and the post-layout Clay_SetPointerState to establish a baseline. Then evaluate a consolidated entry point or packed per-frame state, checking the opsBuf memory-growth concern and whether the change produces measurable improvement.
Written by the indexing model from the issue text.
Description
Motivation
Each render frame currently makes multiple WASM calls: Clay_SetPointerState, Clay_UpdateScrollContainers, reduce, and a post-layout Clay_SetPointerState for hit testing. Each call has JS↔WASM context switch overhead and requires marshaling arguments through shared memory.
While the overhead is likely negligible compared to layout and diffing work, there are two reasons to investigate consolidation:
-
Memory safety: calls that write to
opsBuf(pointer state, scroll delta) followed by calls that read from it (reduce) could break if a WASM call triggers memory growth between them, invalidating theDataView. -
Future proofing: as more pre-layout state is added (drag scrolling, transitions), the number of per-frame calls will grow.
Approach
Profile the current multi-call approach to establish a baseline, then evaluate whether a single consolidated entry point (or packing all per-frame state into the command buffer) yields measurable improvement.
- Dominant language
- TypeScript
- Stars
- 42
- Forks
- 2
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bombshell-dev/tty
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bombshell-dev/tty#61 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bombshell-dev/tty#129 ·
-
question
Difficulty 5/5 Over a week Newbie friendliness 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bombshell-dev/tty#83 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bombshell-dev/tty#82 ·
All issues in bombshell-dev/tty
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·