Start on caching views
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
5904bcf1c2
commit
84c36066bc
7 changed files with 117 additions and 58 deletions
|
@ -601,7 +601,7 @@ impl Render for Dock {
|
|||
Axis::Horizontal => this.min_w(size).h_full(),
|
||||
Axis::Vertical => this.min_h(size).w_full(),
|
||||
})
|
||||
.child(entry.panel.to_any()),
|
||||
.child(entry.panel.to_any().cached()),
|
||||
)
|
||||
.child(handle)
|
||||
} else {
|
||||
|
|
|
@ -3,8 +3,8 @@ use anyhow::{anyhow, Result};
|
|||
use call::{ActiveCall, ParticipantLocation};
|
||||
use collections::HashMap;
|
||||
use gpui::{
|
||||
point, size, AnyWeakView, Axis, Bounds, Entity as _, IntoElement, Model, Pixels, Point, View,
|
||||
ViewContext,
|
||||
point, size, AnyView, AnyWeakView, Axis, Bounds, Entity as _, IntoElement, Model, Pixels,
|
||||
Point, View, ViewContext,
|
||||
};
|
||||
use parking_lot::Mutex;
|
||||
use project::Project;
|
||||
|
@ -244,7 +244,7 @@ impl Member {
|
|||
.relative()
|
||||
.flex_1()
|
||||
.size_full()
|
||||
.child(pane.clone())
|
||||
.child(AnyView::from(pane.clone()).cached())
|
||||
.when_some(leader_border, |this, color| {
|
||||
this.child(
|
||||
div()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue