Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Investigate consolidating WASM transfer calls

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

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

question

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:

  1. 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 the DataView.

  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bombshell-dev/tty

All issues in bombshell-dev/tty

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.