Perf: make build faster

This commit is contained in:
SukkaW
2023-08-11 17:24:56 +08:00
parent e58ad2c0ac
commit 82f10868c1
9 changed files with 97 additions and 108 deletions

View File

@@ -10,12 +10,10 @@ const { readFileByLine } = require('./fetch-remote-text-by-line');
async function compareAndWriteFile(linesA, filePath) {
await fse.ensureFile(filePath);
const rl = readFileByLine(filePath);
let isEqual = true;
let index = 0;
for await (const lineB of rl) {
for await (const lineB of readFileByLine(filePath)) {
const lineA = linesA[index];
index++;