Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Investigate consolidating WASM transfer calls

未关闭
#26 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript, wasm
领域
performance

调研方向

对每个渲染帧中对 Clay_SetPointerState、Clay_UpdateScrollContainers、reduce 以及布局后的 Clay_SetPointerState 的调用进行性能分析,以建立基线。然后评估一个统一的入口点或按帧打包的状态,同时检查 opsBuf 的内存增长问题,以及该更改是否能带来可测量的改进。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
43
派生
2
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bombshell-dev/tty 的其他 Issue

查看 bombshell-dev/tty 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。