perf: optimize server-side analytics and notifications to resolve 32s transaction delay
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m55s
Build & Deploy / 🏗️ Build (push) Successful in 4m18s
Build & Deploy / 🚀 Deploy (push) Successful in 26s
Build & Deploy / 🧪 Smoke Test (push) Successful in 49s
Build & Deploy / ⚡ Lighthouse (push) Successful in 4m11s
Build & Deploy / 🔔 Notify (push) Successful in 2s

- Added 5s timeout to GotifyNotificationService
- Reduced timeout to 2s in UmamiAnalyticsService
- Implemented non-blocking analytics tracking in layout using Next.js after() API
This commit is contained in:
2026-02-18 10:24:10 +01:00
parent df2dd23206
commit ea55580e18
3 changed files with 11 additions and 2 deletions

View File

@@ -88,7 +88,10 @@ export default async function Layout(props: {
});
}
serverServices.analytics.trackPageview();
const { after } = await import('next/server');
after(() => {
serverServices.analytics.trackPageview();
});
} catch {
if (process.env.NODE_ENV !== 'production' || !process.env.CI) {
console.warn(