sharp cache limit ekle - RAM optimizasyonu

This commit is contained in:
AyrisAI
2026-07-11 14:34:10 +03:00
parent 5130dc5779
commit 578b6d6696
3 changed files with 703 additions and 143 deletions
+8
View File
@@ -0,0 +1,8 @@
// instrumentation.ts (proje kök dizini)
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const sharp = require('sharp');
sharp.cache({ memory: 50, files: 20, items: 100 }); // varsayılan çok daha yüksek
sharp.concurrency(2); // paralel işlem thread sayısını sınırla
}
}