From fea7cac20694cf3af02c84338e9bba1864228297 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Sat, 4 Jul 2020 15:18:38 +0200 Subject: [PATCH] Display the time it took to compute the word attribute documents ids --- src/bin/indexer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/indexer.rs b/src/bin/indexer.rs index 1667ac097..1f4139f1b 100644 --- a/src/bin/indexer.rs +++ b/src/bin/indexer.rs @@ -180,6 +180,8 @@ fn index_csv( fn compute_words_attributes_docids(wtxn: &mut heed::RwTxn, index: &Index) -> anyhow::Result<()> { eprintln!("Computing the attributes documents ids..."); + let before = Instant::now(); + let fst = match index.fst(&wtxn)? { Some(fst) => fst.map_data(|s| s.to_vec())?, None => return Ok(()), @@ -214,6 +216,8 @@ fn compute_words_attributes_docids(wtxn: &mut heed::RwTxn, index: &Index) -> any } } + eprintln!("Computing the attributes documents ids took {:.02?}.", before.elapsed()); + Ok(()) }