Reduce jitter, this was too ambitious.

This commit is contained in:
Joshua Yanovski 2022-07-31 02:23:01 -07:00
parent 2a61c7790b
commit 5afb17eb07

View File

@ -280,7 +280,7 @@ pub struct CharacterList {
pub loading: bool, pub loading: bool,
} }
const TOTAL_PENDING_CHUNKS_LIMIT: usize = 2048; const TOTAL_PENDING_CHUNKS_LIMIT: usize = 1024;
impl Client { impl Client {
pub async fn new( pub async fn new(
@ -1872,7 +1872,7 @@ impl Client {
for key in keys.iter() { for key in keys.iter() {
if self.state.terrain().get_key(*key).is_none() { if self.state.terrain().get_key(*key).is_none() {
if !skip_mode && !self.pending_chunks.contains_key(key) { if !skip_mode && !self.pending_chunks.contains_key(key) {
const CURRENT_TICK_PENDING_CHUNKS_LIMIT: usize = 8 * 5; const CURRENT_TICK_PENDING_CHUNKS_LIMIT: usize = 8 * 4;
if self.pending_chunks.len() < TOTAL_PENDING_CHUNKS_LIMIT if self.pending_chunks.len() < TOTAL_PENDING_CHUNKS_LIMIT
&& current_tick_send_chunk_requests && current_tick_send_chunk_requests
< CURRENT_TICK_PENDING_CHUNKS_LIMIT < CURRENT_TICK_PENDING_CHUNKS_LIMIT