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
}
}
+693 -142
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -17,7 +17,8 @@
"postgres": "^3.4.9",
"react": "19.2.3",
"react-dom": "19.2.3",
"resend": "^6.12.3"
"resend": "^6.12.3",
"sharp": "^0.35.3"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",