Fix performance bottlenecks when multi buffers have huge numbers of buffers (#26308)
This is motivated by trying to make the Project Diff view usable with huge Git change sets. Release Notes: - Improved performance of rendering multibuffers with very large numbers of buffers
This commit is contained in:
@@ -2424,14 +2424,10 @@ impl Pane {
|
||||
.child(label),
|
||||
);
|
||||
|
||||
let single_entry_to_resolve = {
|
||||
let item_entries = self.items[ix].project_entry_ids(cx);
|
||||
if item_entries.len() == 1 {
|
||||
Some(item_entries[0])
|
||||
} else {
|
||||
None
|
||||
}
|
||||
};
|
||||
let single_entry_to_resolve = self.items[ix]
|
||||
.is_singleton(cx)
|
||||
.then(|| self.items[ix].project_entry_ids(cx).get(0).copied())
|
||||
.flatten();
|
||||
|
||||
let total_items = self.items.len();
|
||||
let has_items_to_left = ix > 0;
|
||||
|
||||
Reference in New Issue
Block a user