nodejs / nodejs/node

quic|blob: Potentially improve createBlobReaderStream performance

Offen
#60,117 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

quic
Vorherrschende Sprache
JavaScript
Sterne
122k
Forks
37.3k
Ø Merge
4 T. 2 Std.
Gemergte PRs (30 T.)
283

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, nodejs
Bereich
networking, performance
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.