Use sumtree instead of iterator linear search for diff hunks in range

Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Julia 2022-09-30 13:32:54 -04:00
parent bce25918a0
commit 1c5d15b85e
2 changed files with 123 additions and 79 deletions

View file

@ -26,7 +26,7 @@ impl Anchor {
bias: Bias::Right,
buffer_id: None,
};
pub fn cmp(&self, other: &Anchor, buffer: &BufferSnapshot) -> Ordering {
let fragment_id_comparison = if self.timestamp == other.timestamp {
Ordering::Equal