@xinferai/utils-lib
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -969,3 +969,3 @@ "use strict"; | ||
*/ | ||
constructor(cacheSize = 1e3, lowWaterMark = Math.floor(cacheSize * 0.2)) { | ||
constructor(cacheSize = 666, lowWaterMark = Math.floor(cacheSize * 0.2)) { | ||
this.cacheSize = cacheSize; | ||
@@ -991,3 +991,3 @@ this.lowWaterMark = lowWaterMark; | ||
const generateBatch = () => { | ||
const batchSize = 100; | ||
const batchSize = 33; | ||
let generated = 0; | ||
@@ -999,3 +999,3 @@ while (generated < batchSize && this.cache.length < this.cacheSize) { | ||
if (this.cache.length < this.cacheSize) { | ||
setImmediate(generateBatch); | ||
setTimeout(generateBatch, 0); | ||
} else { | ||
@@ -1002,0 +1002,0 @@ this.isGenerating = false; |
@@ -1000,3 +1000,3 @@ "use strict"; | ||
*/ | ||
constructor(cacheSize = 1e3, lowWaterMark = Math.floor(cacheSize * 0.2)) { | ||
constructor(cacheSize = 666, lowWaterMark = Math.floor(cacheSize * 0.2)) { | ||
this.cacheSize = cacheSize; | ||
@@ -1022,3 +1022,3 @@ this.lowWaterMark = lowWaterMark; | ||
const generateBatch = () => { | ||
const batchSize = 100; | ||
const batchSize = 33; | ||
let generated = 0; | ||
@@ -1030,3 +1030,3 @@ while (generated < batchSize && this.cache.length < this.cacheSize) { | ||
if (this.cache.length < this.cacheSize) { | ||
setImmediate(generateBatch); | ||
setTimeout(generateBatch, 0); | ||
} else { | ||
@@ -1033,0 +1033,0 @@ this.isGenerating = false; |
{ | ||
"name": "@xinferai/utils-lib", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"exports": { | ||
@@ -5,0 +5,0 @@ ".": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
490825