@@ -3643,13 +3643,18 @@ reader.read().then(({ value, done }) => { |
3643 | 3643 | added: |
3644 | 3644 | - v19.9.0 |
3645 | 3645 | - v18.17.0 |
| 3646 | +changes: |
| 3647 | + - version: v22.0.0 |
| 3648 | + pr-url: https://github.com/nodejs/node/pull/52037 |
| 3649 | + description: bump default highWaterMark. |
3646 | 3650 | --> |
3647 | 3651 |
|
3648 | 3652 | * `objectMode` {boolean} |
3649 | 3653 | * Returns: {integer} |
3650 | 3654 |
|
3651 | | -Returns the default highWaterMark used by streams. |
3652 | | -Defaults to `65536` (64 KiB), or `16` for `objectMode`. |
| 3655 | +Returns the default highWaterMark used by streams. Defaults to `16` for |
| 3656 | +`objectMode`. For byte streams, it defaults to `65536` (64 KiB) on non-Windows |
| 3657 | +platforms and `16384` (16 KiB) on Windows. |
3653 | 3658 |
|
3654 | 3659 | ### `stream.setDefaultHighWaterMark(objectMode, value)` |
3655 | 3660 |
|
@@ -3779,7 +3784,7 @@ changes: |
3779 | 3784 | * `options` {Object} |
3780 | 3785 | * `highWaterMark` {number} Buffer level when |
3781 | 3786 | [`stream.write()`][stream-write] starts returning `false`. **Default:** |
3782 | | - `65536` (64 KiB), or `16` for `objectMode` streams. |
| 3787 | + See [`stream.getDefaultHighWaterMark()`][]. |
3783 | 3788 | * `decodeStrings` {boolean} Whether to encode `string`s passed to |
3784 | 3789 | [`stream.write()`][stream-write] to `Buffer`s (with the encoding |
3785 | 3790 | specified in the [`stream.write()`][stream-write] call) before passing |
@@ -4153,7 +4158,7 @@ changes: |
4153 | 4158 | * `options` {Object} |
4154 | 4159 | * `highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store |
4155 | 4160 | in the internal buffer before ceasing to read from the underlying resource. |
4156 | | - **Default:** `65536` (64 KiB), or `16` for `objectMode` streams. |
| 4161 | + **Default:** See [`stream.getDefaultHighWaterMark()`][]. |
4157 | 4162 | * `encoding` {string} If specified, then buffers will be decoded to |
4158 | 4163 | strings using the specified encoding. **Default:** `null`. |
4159 | 4164 | * `objectMode` {boolean} Whether this stream should behave |
@@ -5094,6 +5099,7 @@ contain multi-byte characters. |
5094 | 5099 | [`stream.cork()`]: #writablecork |
5095 | 5100 | [`stream.duplexPair()`]: #streamduplexpairoptions |
5096 | 5101 | [`stream.finished()`]: #streamfinishedstream-options-callback |
| 5102 | +[`stream.getDefaultHighWaterMark()`]: #streamgetdefaulthighwatermarkobjectmode |
5097 | 5103 | [`stream.pipe()`]: #readablepipedestination-options |
5098 | 5104 | [`stream.pipeline()`]: #streampipelinesource-transforms-destination-callback |
5099 | 5105 | [`stream.uncork()`]: #writableuncork |
|