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 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 chunker = new DeadlineChunker(3e4);
11941
- console.log(batchInsertData.length);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-dataply",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Simple and powerful JSON document database supporting complex queries and flexible indexing policies.",
5
5
  "license": "MIT",
6
6
  "author": "izure <admin@izure.org>",