From bff0bca41140e313eb13a5eceb505537b40995f7 Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Fri, 26 Jun 2026 10:17:56 -0400 Subject: [PATCH] =?UTF-8?q?Remove=20redundant=20warmOutbox=20calls=20from?= =?UTF-8?q?=20ensureLiveFeedSubscription=20and=20newAuthors=20path=20?= =?UTF-8?q?=E2=80=94=20NDK.subscribe=20already=20calls=20trackUsers=20inte?= =?UTF-8?q?rnally,=20so=20only=20the=20pre-bootstrap=20warmOutbox=20is=20n?= =?UTF-8?q?eeded.=20This=20reduces=20the=20outbox=20event=20burst=20that?= =?UTF-8?q?=20was=20starving=20the=20worker=20message=20queue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/feed.html | 12 ++++-------- www/js/version.json | 6 +++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/www/feed.html b/www/feed.html index 4e7ad01..9adeeb2 100644 --- a/www/feed.html +++ b/www/feed.html @@ -556,9 +556,8 @@ import { initPostCards } from './js/post-interactions2.mjs'; const now = Math.floor(Date.now() / 1000); const since = newestKnown > 0 ? Math.max(0, newestKnown - 30) : (now - 3600); - // Fire-and-forget: NDK.subscribe already calls trackUsers internally, - // but doing it explicitly avoids relying on internal timing. - void warmOutbox(authors).catch(() => {}); + // NDK.subscribe already calls outboxTracker.trackUsers internally, + // so no explicit warmOutbox call is needed here. subscribe( { kinds: [1], authors, since }, @@ -594,11 +593,8 @@ import { initPostCards } from './js/post-interactions2.mjs'; } if (newAuthors.length > 0) { - try { - await warmOutbox(newAuthors); - } catch (e) { - console.warn('[feed.html] warmOutbox for new authors failed (non-blocking):', e?.message || e); - } + // NDK's fetchEvents/subscribe already calls outboxTracker.trackUsers + // internally for author-based filters, so no explicit warmOutbox needed. try { await fetchFeedWindow(newAuthors, { limit: INITIAL_POSTS_LOAD }); renderFeed(); diff --git a/www/js/version.json b/www/js/version.json index 9020189..d6f8c21 100644 --- a/www/js/version.json +++ b/www/js/version.json @@ -1,5 +1,5 @@ { - "VERSION": "v0.7.47", - "VERSION_NUMBER": "0.7.47", - "BUILD_DATE": "2026-06-26T14:14:21.559Z" + "VERSION": "v0.7.48", + "VERSION_NUMBER": "0.7.48", + "BUILD_DATE": "2026-06-26T14:17:56.525Z" }