nodejs / nodejs/node

quic|blob: Potentially improve createBlobReaderStream performance

オープン
#60,117 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

quic
主要言語
JavaScript
スター
122k
フォーク
37.4k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。