mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 17:20:35 +08:00
Chore: increate fs write worker threshold
This commit is contained in:
parent
ce42147a9d
commit
9a64111034
@ -49,7 +49,7 @@ const pool = new Worktank({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function compareAndWriteFileInWorker(span: Span, linesA: string[], filePath: string) {
|
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());
|
process.on('beforeExit', () => pool.terminate());
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export abstract class BaseWriteStrategy {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.result.length > 1000) {
|
if (this.result.length > 2000) {
|
||||||
return compareAndWriteFileInWorker(
|
return compareAndWriteFileInWorker(
|
||||||
span,
|
span,
|
||||||
this.withPadding(
|
this.withPadding(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user