mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-08-28 04:44:18 +00:00
perf: Always fetch at least N events per GME
This commit is contained in:
@@ -497,7 +497,13 @@ pub async fn get_missing_events(
|
||||
let limit = iteration
|
||||
.expected_add(1)
|
||||
.saturating_mul(10)
|
||||
.min(GET_MISSING_EVENTS_MAX_BATCH_SIZE);
|
||||
.min(GET_MISSING_EVENTS_MAX_BATCH_SIZE)
|
||||
.max(
|
||||
// This max call ensures we fetch *at least* all the prev events the
|
||||
// head has.
|
||||
u16::try_from(head.prev_events.len())
|
||||
.expect("cannot have more than 20 prev events, which fits in u16"),
|
||||
);
|
||||
debug_info!(elapsed=?start.elapsed(),
|
||||
%limit,
|
||||
%via,
|
||||
|
||||
Reference in New Issue
Block a user