quic|blob: Potentially improve createBlobReaderStream performance
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.4k
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 272
描述
I am currently looking at the quic implementation code (in order to use it for webtransport).
I have seen that the quic implementation uses createBlobReaderStream
https://github.com/nodejs/node/blob/6f941fcfba50fe7c3a342ed2066770aecaaa9b5a/lib/internal/blob.js#L435
for getting the readable.
I am wondering createBlobReaderStream recreates functions for every call to pull.
My experience with webstreams in the browser (also using V8) suggests that this potentially creates a large number of function objects on the stack.
So I wonder, if it is not better to move readNext up to the top closure of the function and pass the controller as an argument.
This may be important, if you run for example a video stream over a webtransport stream.
Or am I am missing something?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
Start with lib/internal/blob.js at createBlobReaderStream around line 435, then trace its use from the QUIC implementation. Measure whether the current pull-path function creation affects a representative streaming workload, and compare any proposed change. Done requires evidence that the change improves performance without altering stream behavior.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, nodejs
- 领域
- networking, performance
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100