document-dataply 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +6 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -11937,8 +11937,12 @@ var MutationManager = class {
|
|
|
11937
11937
|
batchInsertData.push([item.pk, { k: item.pk, v: indexVal }]);
|
|
11938
11938
|
}
|
|
11939
11939
|
}
|
|
11940
|
-
const
|
|
11941
|
-
|
|
11940
|
+
const initMaxSize = 5e4;
|
|
11941
|
+
const initChunkSize = Math.min(
|
|
11942
|
+
initMaxSize,
|
|
11943
|
+
Math.max(initMaxSize, Math.floor(batchInsertData.length / 100 * 5))
|
|
11944
|
+
);
|
|
11945
|
+
const chunker = new DeadlineChunker(initChunkSize);
|
|
11942
11946
|
await chunker.processInChunks(batchInsertData, async (chunk) => {
|
|
11943
11947
|
const [error] = await catchPromise(treeTx.batchInsert(chunk));
|
|
11944
11948
|
if (error) {
|
package/package.json
CHANGED