From d04d8e37d0991f504ac615892ea46dc312b2347b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 09:34:50 +0000 Subject: [PATCH] perf: optimize defaultApps lookup with static cache Co-authored-by: lsb11 <269203137+lsb11@users.noreply.github.com> --- src/pages/shopify-automation-scanner.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/shopify-automation-scanner.astro b/src/pages/shopify-automation-scanner.astro index b1d0d11..fbb9627 100644 --- a/src/pages/shopify-automation-scanner.astro +++ b/src/pages/shopify-automation-scanner.astro @@ -821,7 +821,8 @@ const schema = { } const sleep = ms => new Promise(r => setTimeout(r,ms)); - const defaultApps = () => ['Klaviyo','Triple Whale','Gorgias'].map(n => appLibrary.find(a => a.name===n)).filter(Boolean); + const defaultAppsCache = appLibrary.filter(a => a.name === 'Klaviyo' || a.name === 'Triple Whale' || a.name === 'Gorgias'); + const defaultApps = () => defaultAppsCache; // ── RENDER ──────────────────────────────────────────────────── function renderResults(detected, domain) {