Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Investigate consolidating WASM transfer calls

Aperta
#26 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript, wasm
Ambito
performance

Direzione di ricerca

Profilare le chiamate per frame di rendering a Clay_SetPointerState, Clay_UpdateScrollContainers, reduce e la chiamata a Clay_SetPointerState successiva al layout per stabilire una baseline. Valutare quindi un punto di ingresso consolidato o uno stato per frame impacchettato, verificando la preoccupazione relativa alla crescita della memoria di opsBuf e se la modifica produce un miglioramento misurabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
42
Fork
2
Merge medio
2g 5h
PR unite (30g)
12

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bombshell-dev/tty

Tutte le issue di bombshell-dev/tty

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.