mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-28 01:07:09 +00:00
Let ignore edits batch naturally without imposing a max batch len
This commit is contained in:
parent
af3bc236b7
commit
19a2856780
1 changed files with 0 additions and 7 deletions
|
@ -31,7 +31,6 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
const GITIGNORE: &'static str = ".gitignore";
|
const GITIGNORE: &'static str = ".gitignore";
|
||||||
const EDIT_BATCH_LEN: usize = 2000;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
enum ScanState {
|
enum ScanState {
|
||||||
|
@ -995,9 +994,6 @@ impl BackgroundScanner {
|
||||||
edits.push(edit);
|
edits.push(edit);
|
||||||
while let Ok(edit) = edits_rx.try_recv() {
|
while let Ok(edit) = edits_rx.try_recv() {
|
||||||
edits.push(edit);
|
edits.push(edit);
|
||||||
if edits.len() == EDIT_BATCH_LEN {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.snapshot.lock().entries.edit(mem::take(&mut edits));
|
self.snapshot.lock().entries.edit(mem::take(&mut edits));
|
||||||
}
|
}
|
||||||
|
@ -1040,9 +1036,6 @@ impl BackgroundScanner {
|
||||||
edits.push(edit);
|
edits.push(edit);
|
||||||
while let Ok(edit) = edits_rx.try_recv() {
|
while let Ok(edit) = edits_rx.try_recv() {
|
||||||
edits.push(edit);
|
edits.push(edit);
|
||||||
if edits.len() == EDIT_BATCH_LEN {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.snapshot.lock().entries.edit(mem::take(&mut edits));
|
self.snapshot.lock().entries.edit(mem::take(&mut edits));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue