Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test_runner: disable highWatermark on TestsStream
The default highWatermark of 16 on the TestsStream class can
have a substantial impact on reporting performance. This commit
sets the TestsStream highWatermark to a very large value and
lets the destination streams (which are more likely to have
meaningful highWatermarks) handle backpressure.
  • Loading branch information
cjihrig committed Mar 31, 2024
commit cd8a64f14ca312dcce2fd8e1343803e29ab0c069
7 changes: 6 additions & 1 deletion lib/internal/test_runner/tests_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const {
ArrayPrototypePush,
ArrayPrototypeShift,
NumberMAX_SAFE_INTEGER,
Symbol,
} = primordials;
const Readable = require('internal/streams/readable');
Expand All @@ -12,7 +13,11 @@ class TestsStream extends Readable {
#canPush;

constructor() {
super({ __proto__: null, objectMode: true });
super({
__proto__: null,
objectMode: true,
highWaterMark: NumberMAX_SAFE_INTEGER,
});
this.#buffer = [];
this.#canPush = true;
}
Expand Down