Display the time it took to compute the word attribute documents ids

This commit is contained in:
Kerollmops 2020-07-04 15:18:38 +02:00
parent 46ced5c828
commit fea7cac206
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -180,6 +180,8 @@ fn index_csv<R: io::Read>(
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(())
}