瀏覽代碼

Chore: increate fs write worker threshold

SukkaW 10 月之前
父節點
當前提交
9a64111034
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Build/lib/create-file.worker.ts
  2. 1 1
      Build/lib/writing-strategy/base.ts

+ 1 - 1
Build/lib/create-file.worker.ts

@@ -49,7 +49,7 @@ const pool = new Worktank({
 });
 
 export function compareAndWriteFileInWorker(span: Span, linesA: string[], filePath: string) {
-  return span.traceChildAsync(`compare and write ${filePath}`, () => pool.exec('compareAndWriteFile', [linesA, filePath, import.meta.url]));
+  return span.traceChildAsync(`compare and write (worker) ${filePath}`, () => pool.exec('compareAndWriteFile', [linesA, filePath, import.meta.url]));
 }
 
 process.on('beforeExit', () => pool.terminate());

+ 1 - 1
Build/lib/writing-strategy/base.ts

@@ -79,7 +79,7 @@ export abstract class BaseWriteStrategy {
       return;
     }
 
-    if (this.result.length > 1000) {
+    if (this.result.length > 2000) {
       return compareAndWriteFileInWorker(
         span,
         this.withPadding(