From 3b10a1f47fd5838fe3b94c19673a52610b88cf1e Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 1 Mar 2026 14:20:08 -0800
Subject: perf: optimise list hot paths and shared timers

---
 src/routes/completed/+page.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/routes/completed/+page.svelte')

diff --git a/src/routes/completed/+page.svelte b/src/routes/completed/+page.svelte
index 3c6b3b4d..8d5eff52 100644
--- a/src/routes/completed/+page.svelte
+++ b/src/routes/completed/+page.svelte
@@ -16,15 +16,15 @@
 
   export let data;
 
-  let heightObserver: ReturnType<typeof setInterval>;
+  let removeHeightObserver: (() => void) | undefined;
 
   onMount(() => {
-    heightObserver = setInterval(() => createHeightObserver(), 0);
+    removeHeightObserver = createHeightObserver();
     $stateBin.completedAnimeListOpen ??= true;
     $stateBin.completedMangaListOpen ??= true;
   });
 
-  onDestroy(() => clearInterval(heightObserver));
+  onDestroy(() => removeHeightObserver?.());
 </script>
 
 <HeadTitle route="Completed" path="/completed" />
-- 
cgit v1.2.3

