From 7ca71efc4c1c93fdb3ca1fff02f61366c9f4d557 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 13 Sep 2024 18:48:50 +0800 Subject: [PATCH] Move the end parts --- src/pages/following.jsx | 2 +- src/pages/home.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/following.jsx b/src/pages/following.jsx index bc7e5dd1..cfda7845 100644 --- a/src/pages/following.jsx +++ b/src/pages/following.jsx @@ -22,6 +22,7 @@ function Following({ title, path, id, ...props }) { const snapStates = useSnapshot(states); const homeIterator = useRef(); const latestItem = useRef(); + __BENCHMARK.end('time-to-following'); console.debug('RENDER Following', title, id); const supportsPixelfed = supports('@pixelfed/home-include-reblogs'); @@ -100,7 +101,6 @@ function Following({ title, path, id, ...props }) { } useEffect(() => { - __BENCHMARK.end('time-to-following'); let sub; (async () => { if (streaming) { diff --git a/src/pages/home.jsx b/src/pages/home.jsx index 48bbf472..408add69 100644 --- a/src/pages/home.jsx +++ b/src/pages/home.jsx @@ -27,8 +27,8 @@ import { function Home() { const { _ } = useLingui(); const snapStates = useSnapshot(states); + __BENCHMARK.end('time-to-home'); useEffect(() => { - __BENCHMARK.end('time-to-home'); (async () => { const keys = await db.drafts.keys(); if (keys.length) {