diff --git a/lib/internal/streams/operators.js b/lib/internal/streams/operators.js index 9fee6024e3173a..00156164883d58 100644 --- a/lib/internal/streams/operators.js +++ b/lib/internal/streams/operators.js @@ -15,12 +15,6 @@ module.exports.map = function map(stream, fn, options) { concurrency = options.concurrency; } - let highWaterMark = 1; - if (options && Number.isFinite(options.highWaterMark)) { - highWaterMark = options.highWaterMark; - } - highWaterMark = Math.max(0, highWaterMark - concurrency) - let objectMode = stream.readableObjectMode ?? stream.objectMode ?? true; if (options && typeof options.objectMode === 'boolean') { objectMode = options.objectMode; @@ -32,9 +26,9 @@ module.exports.map = function map(stream, fn, options) { let reading = false; + // TODO: What about hwm? This will cause some unecessary buffering. const ret = new Readable({ objectMode, - highWaterMark, read () { if (!reading) { read();