perf: code

This commit is contained in:
archer
2023-06-15 17:32:12 +08:00
parent bf1592d2c6
commit 6f9e929298
8 changed files with 53 additions and 17 deletions

View File

@@ -73,6 +73,9 @@ export async function pushDataToKb({
const set = new Set();
const filterData: DateItemType[] = [];
const time = Date.now();
console.log('push data', data.length);
data.forEach((item) => {
const text = item.q + item.a;
@@ -153,6 +156,8 @@ export async function pushDataToKb({
insertData.length > 0 && startQueue();
console.log('push data finish', Date.now() - time);
return {
insertLen: insertData.length
};