Investigate consolidating WASM transfer calls
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript, wasm
- 领域
- performance
调研方向
对每个渲染帧中对 Clay_SetPointerState、Clay_UpdateScrollContainers、reduce 以及布局后的 Clay_SetPointerState 的调用进行性能分析,以建立基线。然后评估一个统一的入口点或按帧打包的状态,同时检查 opsBuf 的内存增长问题,以及该更改是否能带来可测量的改进。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 43
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bombshell-dev/tty 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
bombshell-dev/tty#61 · 1 个 reaction ·
-
Track terminfo capability follow-ups可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
bombshell-dev/tty#129 ·
-
question
难度 5/5 一周以上 新手友好度 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
难度 3/5 1-2 天 新手友好度 68/100
bombshell-dev/tty#83 · 2 条评论 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
bombshell-dev/tty#82 ·
查看 bombshell-dev/tty 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复