quic|blob: Potentially improve createBlobReaderStream performance
Dieses Issue hat noch niemand übernommen.
- 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
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Ö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