Merge pull request #707 from ludovic111/perf/hub-fx-player-sets
Server: Fx hashing for each player's sent chunks and tracked entities
This commit is contained in:
@@ -58,7 +58,7 @@ struct Sent {
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Tracker {
|
||||
sent: std::collections::HashMap<i32, Sent>,
|
||||
sent: crate::fast_hash::FxHashMap<i32, Sent>,
|
||||
}
|
||||
|
||||
/// VecDeltaCodec.encode.
|
||||
|
||||
@@ -8,7 +8,7 @@ use horizon_protocol::{
|
||||
packets::{configuration::ClientInformation, play},
|
||||
};
|
||||
use std::{
|
||||
collections::{HashSet, VecDeque},
|
||||
collections::VecDeque,
|
||||
sync::{Arc, atomic::AtomicI32},
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ pub struct Guest {
|
||||
pub loaded: bool,
|
||||
// Chunks.
|
||||
pub center: Option<(i32, i32)>,
|
||||
pub sent_chunks: HashSet<(i32, i32)>,
|
||||
pub sent_chunks: crate::fast_hash::FxHashSet<(i32, i32)>,
|
||||
pub chunk_queue: Vec<(i32, i32)>,
|
||||
pub unacknowledged: u32,
|
||||
pub chunks_per_tick: f32,
|
||||
@@ -189,7 +189,7 @@ impl Guest {
|
||||
teleport_counter: 0,
|
||||
loaded: false,
|
||||
center: None,
|
||||
sent_chunks: HashSet::new(),
|
||||
sent_chunks: Default::default(),
|
||||
chunk_queue: Vec::new(),
|
||||
unacknowledged: 0,
|
||||
chunks_per_tick: 9.0,
|
||||
|
||||
Reference in New Issue
Block a user