Improve sync performance with more caching and wrapping things in Arcs to avoid copies

This commit is contained in:
Timo Kösters 2023-06-27 13:06:55 +02:00
parent 7c6d25dcd1
commit be877ef719
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB
12 changed files with 112 additions and 98 deletions

View file

@ -1,12 +1,12 @@
use std::collections::HashSet;
use std::{collections::HashSet, sync::Arc};
use super::CompressedStateEvent;
use crate::Result;
pub struct StateDiff {
pub parent: Option<u64>,
pub added: HashSet<CompressedStateEvent>,
pub removed: HashSet<CompressedStateEvent>,
pub added: Arc<HashSet<CompressedStateEvent>>,
pub removed: Arc<HashSet<CompressedStateEvent>>,
}
pub trait Data: Send + Sync {