From 84bab9178a301944f7c5978398d3397733e02b9f Mon Sep 17 00:00:00 2001 From: Matyas Cimbulka Date: Thu, 29 Jan 2026 13:23:01 +0100 Subject: [PATCH] fix: Speed up creating archives for big codebases --- src/lib/utils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 1a3f0790..99bb775c 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -307,10 +307,13 @@ export const createActZip = async (zipName: string, pathsToZip: string[], cwd: s } const writeStream = createWriteStream(zipName); - const archive = archiver('zip'); + // Use compression level 6 for better balance between speed and compression ratio (default is 9) + const archive = archiver('zip', { + zlib: { level: 6 }, + }); archive.pipe(writeStream); - pathsToZip.forEach((globPath) => archive.glob(globPath, { cwd })); + pathsToZip.forEach((filePath) => archive.file(join(cwd, filePath), { name: filePath })); await archive.finalize(); };