Track dirtyness per item (#26237)
This reduces the number of multibuffer syncs when starting the editor with 80 files open in the Zed repo from 10,000,000 to 100,000 by avoiding O(n**2) dirtyness checks. Release Notes: - Fixed a beachball when restarting in a large repo with a large number open files
This commit is contained in:
parent
263d9ff755
commit
f373383fc1
3 changed files with 43 additions and 7 deletions
|
@ -802,6 +802,7 @@ impl<T: Item> ItemHandle for Entity<T> {
|
|||
}
|
||||
|
||||
ItemEvent::UpdateTab => {
|
||||
workspace.update_item_dirty_state(item, window, cx);
|
||||
pane.update(cx, |_, cx| {
|
||||
cx.emit(pane::Event::ChangeItemTitle);
|
||||
cx.notify();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue