Let ignore edits batch naturally without imposing a max batch len

This commit is contained in:
Antonio Scandurra 2021-04-22 16:47:41 +02:00
parent af3bc236b7
commit 19a2856780

View file

@ -31,7 +31,6 @@ use std::{
};
const GITIGNORE: &'static str = ".gitignore";
const EDIT_BATCH_LEN: usize = 2000;
#[derive(Clone, Debug)]
enum ScanState {
@ -995,9 +994,6 @@ impl BackgroundScanner {
edits.push(edit);
while let Ok(edit) = edits_rx.try_recv() {
edits.push(edit);
if edits.len() == EDIT_BATCH_LEN {
break;
}
}
self.snapshot.lock().entries.edit(mem::take(&mut edits));
}
@ -1040,9 +1036,6 @@ impl BackgroundScanner {
edits.push(edit);
while let Ok(edit) = edits_rx.try_recv() {
edits.push(edit);
if edits.len() == EDIT_BATCH_LEN {
break;
}
}
self.snapshot.lock().entries.edit(mem::take(&mut edits));
}