Skip to content

Commit

Permalink
chore: short tick interval
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Aug 28, 2024
1 parent e8533c2 commit 50f2d18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/client-api/src/ws/msg_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async fn handle_tick(
maximum_payload_size: usize,
weak_seen_ids: Weak<Mutex<HashSet<SeenId>>>,
) -> (usize, usize) {
let (did_sent_seen_ids, messages_map) = next_batch_message(10, maximum_payload_size, queue).await;
let (did_sent_seen_ids, messages_map) = next_batch_message(20, maximum_payload_size, queue).await;
if messages_map.is_empty() {
return (0, 0);
}
Expand Down Expand Up @@ -227,9 +227,9 @@ fn calculate_next_tick_duration(
Duration::from_secs(1)
} else {
match num_init_sync {
0..=3 => default_interval,
4..=7 => Duration::from_secs(4),
_ => Duration::from_secs(6),
0..=10 => default_interval,
10..=20 => Duration::from_secs(2),
_ => Duration::from_secs(4),
}
}
}

0 comments on commit 50f2d18

Please sign in to comment.