chore: use cached diff calc

This commit is contained in:
Zixuan Chen 2024-09-26 00:25:39 +08:00
parent 35854743f0
commit e25b93c491
No known key found for this signature in database

View file

@ -1082,7 +1082,7 @@ impl LoroDoc {
}
let mut state = self.state.lock().unwrap();
let mut calc = DiffCalculator::new(false);
let mut calc = self.diff_calculator.lock().unwrap();
for &i in frontiers.iter() {
if !oplog.dag.contains(i) {
drop(oplog);