Add more debug, where are those 100ms

This commit is contained in:
Clément Renault 2019-12-22 19:04:21 +01:00
parent ed6172aa94
commit 064cfa4755
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE

View File

@ -65,6 +65,8 @@ where
); );
} }
let before_bucket_sort = Instant::now();
let (mut automatons, mut query_enhancer) = let (mut automatons, mut query_enhancer) =
construct_automatons(reader, query, main_store, postings_lists_store, synonyms_store)?; construct_automatons(reader, query, main_store, postings_lists_store, synonyms_store)?;
@ -167,8 +169,11 @@ where
let iter = raw_documents.into_iter().skip(range.start).take(range.len()); let iter = raw_documents.into_iter().skip(range.start).take(range.len());
let iter = iter.map(|rd| Document::from_raw(rd, &automatons, &arena, searchable_attrs.as_ref())); let iter = iter.map(|rd| Document::from_raw(rd, &automatons, &arena, searchable_attrs.as_ref()));
let documents = iter.collect();
Ok(iter.collect()) debug!("bucket sort took {:.02?}", before_bucket_sort.elapsed());
Ok(documents)
} }
pub fn bucket_sort_with_distinct<'c, FI, FD>( pub fn bucket_sort_with_distinct<'c, FI, FD>(