Stream performance improvement ideas
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 399
- Forks
- 11
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
cc @anonrig from our chat
- Reduce memory overhead by using bit maps instead of many booleans for state
- Use a deque instead of a linked list for the BufferList
- Optimize for a single pipe rather than an array of pipes and fallback to array of pipes
More wild ideas:
- Split Readable into several classes and "bailout" from fast to slow ones (e.g. objectMode and bytes, multiple readers vs. one, flowing vs. non flowing) based on most streams not changing their type during their lifetime.
- Don't require a "full" event emitter necessarily for a stream unless the user is listening to an event and "fast-path" if a stream is piped
cc @ronag @nodejs/streams
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by identifying the stream implementation and establishing a performance baseline for the listed BufferList, pipe, and state-storage ideas; the issue does not define a specific completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100