From 3cb85a7b705e180b85e5efb5689433a3c9ffbb37 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Wed, 20 Nov 2024 13:33:54 -0800 Subject: [PATCH] Simplify paging algorithm --- packages/feeds/src/controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/feeds/src/controller.ts b/packages/feeds/src/controller.ts index 6730864..7317471 100644 --- a/packages/feeds/src/controller.ts +++ b/packages/feeds/src/controller.ts @@ -128,7 +128,7 @@ export class FeedController { // Relays can't be relied upon to return events in descending order, do exponential // windowing to ensure we get the most recent stuff on first load, but eventually find it all if (count < limit) { - delta = delta * Math.round(10 - 9 * (Math.log(count + 1) / Math.log(limit + 1))) + delta = delta * Math.round(100 * (2 - inc(count) / inc(limit))) until = since }