firefox-devtools / firefox-devtools/profiler-server

Change implementation of the Concatenator to make it look like more a stream

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21
Forks
15
Avg merge
9h 23m
Merged PRs (30d)
8

Description

The Concatenator works by keeping all chunks in an array, and concatenating them all when the stream is ended. Then we keep and return this result when `transferContents` is called. The result is also cleared when the stream is destroy.

Node v14 now autodestroys stream by default when it ends.
The easy option is to force autoDestroy to true in the constructor.
A better option could be to output the result at the end like a stream, simply pushing the result of the concatenation. Possibly we would need to use objectMode for this too, so that node handles this result as one object instead of a big chunk. This would make the object more true to how streams work, and in the end more compatible with this mechanism in the long run.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-985)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.