diff --git a/src/database/mod.rs b/src/database/mod.rs index 32ca4ca14..d34a288ca 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -39,10 +39,18 @@ where D: Deref fn retrieve_data_index(snapshot: &Snapshot) -> Result> where D: Deref { - let index = match snapshot.get(DATA_INDEX)? { + let (elapsed, vector) = elapsed::measure_time(|| snapshot.get(DATA_INDEX)); + info!("loading index from kv-store took {}", elapsed); + + let index = match vector? { Some(vector) => { let bytes = vector.as_ref().to_vec(); - Index::from_bytes(bytes)? + info!("index size if {} MiB", bytes.len() / 1024 / 1024); + + let (elapsed, index) = elapsed::measure_time(|| Index::from_bytes(bytes)); + info!("loading index from bytes took {}", elapsed); + index? + }, None => Index::default(), }; diff --git a/src/rank/query_builder.rs b/src/rank/query_builder.rs index 3710f1971..b38a1dae8 100644 --- a/src/rank/query_builder.rs +++ b/src/rank/query_builder.rs @@ -162,7 +162,6 @@ where D: Deref, let (elapsed, ()) = elapsed::measure_time(|| { group.sort_unstable_by(|a, b| criterion.evaluate(a, b, view)); }); - info!("criterion {} sort took {}", ci, elapsed); for group in BinaryGroupByMut::new(group, |a, b| criterion.eq(a, b, view)) {