Remove useless commented code

This commit is contained in:
Clément Renault 2024-10-17 10:50:52 +02:00
parent b602f73f0d
commit cd0d211add
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
2 changed files with 3 additions and 8 deletions

View File

@ -211,10 +211,7 @@ pub struct SpilledCache<MF> {
} }
impl<MF> SpilledCache<MF> { impl<MF> SpilledCache<MF> {
pub fn reconstruct<'extractor>( pub fn reconstruct(self, alloc: RefBump<'_>) -> CboCachedSorter<'_, MF> {
self,
alloc: RefBump<'extractor>,
) -> CboCachedSorter<'extractor, MF> {
let SpilledCache { sorter, deladd_buffer, cbo_buffer, total_insertions, fitted_in_key } = let SpilledCache { sorter, deladd_buffer, cbo_buffer, total_insertions, fitted_in_key } =
self; self;

View File

@ -324,6 +324,8 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> {
exact_word_docids, exact_word_docids,
word_position_docids, word_position_docids,
fid_word_count_docids, fid_word_count_docids,
// Note that fid_word_count and current_docid do not have any reference
// to any 'extractor-allocated memory so we don't have to spill it to disk
fid_word_count, fid_word_count,
current_docid, current_docid,
} = sorters; } = sorters;
@ -333,8 +335,6 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> {
let spilled_exact_word_docids = exact_word_docids.spill_to_disk()?; let spilled_exact_word_docids = exact_word_docids.spill_to_disk()?;
let spilled_word_position_docids = word_position_docids.spill_to_disk()?; let spilled_word_position_docids = word_position_docids.spill_to_disk()?;
let spilled_fid_word_count_docids = fid_word_count_docids.spill_to_disk()?; let spilled_fid_word_count_docids = fid_word_count_docids.spill_to_disk()?;
// let spilled_fid_word_count = fid_word_count.spill_to_disk()?;
// let spilled_current_docid = current_docid.spill_to_disk()?;
extractor_alloc.borrow_mut().reset(); extractor_alloc.borrow_mut().reset();
@ -345,8 +345,6 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> {
exact_word_docids: spilled_exact_word_docids.reconstruct(RefBump::clone(&alloc)), exact_word_docids: spilled_exact_word_docids.reconstruct(RefBump::clone(&alloc)),
word_position_docids: spilled_word_position_docids.reconstruct(RefBump::clone(&alloc)), word_position_docids: spilled_word_position_docids.reconstruct(RefBump::clone(&alloc)),
fid_word_count_docids: spilled_fid_word_count_docids.reconstruct(alloc), fid_word_count_docids: spilled_fid_word_count_docids.reconstruct(alloc),
// fid_word_count: spilled_fid_word_count.reconstruct(),
// current_docid: spilled_current_docid.reconstruct(),
fid_word_count, fid_word_count,
current_docid, current_docid,
}); });