@naturalcycles/nodejs-lib
Advanced tools
Comparing version 13.19.0 to 13.20.0
@@ -21,3 +21,6 @@ import { AbortableAsyncMapper, AsyncPredicate, CommonLogger, END, ErrorMode, Promisable, SKIP, StringMap, UnixTimestampMillisNumber } from '@naturalcycles/js-lib'; | ||
* | ||
* @default 16 (to match default highWatermark option for objectMode streams) | ||
* Default is 32. | ||
* It was recently changed up from 16, after some testing that shown that | ||
* for simple low-cpu mapper functions 32 produces almost 2x throughput. | ||
* For example, in scenarios like streaming a query from Datastore. | ||
*/ | ||
@@ -87,3 +90,3 @@ concurrency?: number; | ||
* | ||
* Concurrency defaults to 16. | ||
* Concurrency defaults to 32. | ||
* | ||
@@ -90,0 +93,0 @@ * If an Array is returned by `mapper` - it will be flattened and multiple results will be emitted from it. Tested by Array.isArray(). |
@@ -18,3 +18,3 @@ "use strict"; | ||
* | ||
* Concurrency defaults to 16. | ||
* Concurrency defaults to 32. | ||
* | ||
@@ -24,3 +24,3 @@ * If an Array is returned by `mapper` - it will be flattened and multiple results will be emitted from it. Tested by Array.isArray(). | ||
function transformMap(mapper, opt = {}) { | ||
const { concurrency = 16, predicate, // we now default to "no predicate" (meaning pass-everything) | ||
const { concurrency = 32, predicate, // we now default to "no predicate" (meaning pass-everything) | ||
errorMode = js_lib_1.ErrorMode.THROW_IMMEDIATELY, flattenArrayOutput, onError, onDone, metric = 'stream', logger = console, } = opt; | ||
@@ -27,0 +27,0 @@ const started = Date.now(); |
{ | ||
"name": "@naturalcycles/nodejs-lib", | ||
"version": "13.19.0", | ||
"version": "13.20.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "prepare": "husky", |
@@ -43,3 +43,6 @@ import { | ||
* | ||
* @default 16 (to match default highWatermark option for objectMode streams) | ||
* Default is 32. | ||
* It was recently changed up from 16, after some testing that shown that | ||
* for simple low-cpu mapper functions 32 produces almost 2x throughput. | ||
* For example, in scenarios like streaming a query from Datastore. | ||
*/ | ||
@@ -121,3 +124,3 @@ concurrency?: number | ||
* | ||
* Concurrency defaults to 16. | ||
* Concurrency defaults to 32. | ||
* | ||
@@ -131,3 +134,3 @@ * If an Array is returned by `mapper` - it will be flattened and multiple results will be emitted from it. Tested by Array.isArray(). | ||
const { | ||
concurrency = 16, | ||
concurrency = 32, | ||
predicate, // we now default to "no predicate" (meaning pass-everything) | ||
@@ -134,0 +137,0 @@ errorMode = ErrorMode.THROW_IMMEDIATELY, |
468127
13288