mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-22 12:57:20 +00:00
chore: cleanup
This commit is contained in:
parent
0bac73b029
commit
e00337d7d8
3 changed files with 2 additions and 6 deletions
|
@ -55,11 +55,6 @@ pub fn main() {
|
|||
after_free_history_cache - after_compact_change_store
|
||||
);
|
||||
|
||||
// Checkout after compact change store
|
||||
doc.check_state_correctness_slow();
|
||||
let after_checkout = get_mem_usage();
|
||||
println!("Allocated bytes after checkout: {}", after_checkout);
|
||||
|
||||
let snapshot = doc.export_snapshot();
|
||||
println!("Snapshot size: {}", ByteSize(snapshot.len()));
|
||||
}
|
||||
|
|
|
@ -206,6 +206,7 @@ mod mem {
|
|||
end: Bound<&[u8]>,
|
||||
f: CompareFn,
|
||||
) -> Option<(Bytes, Bytes)> {
|
||||
// PERF: This is super slow
|
||||
for (k, v) in self.range::<[u8], _>((start, end)) {
|
||||
match f(k, v) {
|
||||
std::cmp::Ordering::Equal => return Some((k.clone(), v.clone())),
|
||||
|
|
|
@ -1157,7 +1157,7 @@ impl LoroDoc {
|
|||
///
|
||||
/// Panic when it's not consistent
|
||||
pub fn check_state_diff_calc_consistency_slow(&self) {
|
||||
// #[cfg(any(test, debug_assertions))]
|
||||
#[cfg(any(test, debug_assertions, feature = "test_utils"))]
|
||||
{
|
||||
static IS_CHECKING: AtomicBool = AtomicBool::new(false);
|
||||
if IS_CHECKING.load(std::sync::atomic::Ordering::Acquire) {
|
||||
|
|
Loading…
Reference in a new issue