Scope line layout cache to each window (#7235)
This improves a performance problem we were observing when having multiple windows updating at the same time, where each window would invalidate the other window's layout cache. Release Notes: - Improved performance when having multiple Zed windows open. Co-authored-by: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
5360c0ea28
commit
a0b52cc69a
5 changed files with 104 additions and 78 deletions
|
@ -4,8 +4,8 @@ use gpui::{
|
|||
ElementContext, ElementId, FocusHandle, Font, FontStyle, FontWeight, HighlightStyle, Hsla,
|
||||
InputHandler, InteractiveBounds, InteractiveElement, InteractiveElementState, Interactivity,
|
||||
IntoElement, LayoutId, Model, ModelContext, ModifiersChangedEvent, MouseButton, MouseMoveEvent,
|
||||
Pixels, Point, ShapedLine, StatefulInteractiveElement, Styled, TextRun, TextStyle, TextSystem,
|
||||
UnderlineStyle, WeakView, WhiteSpace, WindowContext,
|
||||
Pixels, Point, ShapedLine, StatefulInteractiveElement, Styled, TextRun, TextStyle,
|
||||
UnderlineStyle, WeakView, WhiteSpace, WindowContext, WindowTextSystem,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use language::CursorShape;
|
||||
|
@ -185,7 +185,7 @@ impl TerminalElement {
|
|||
grid: &Vec<IndexedCell>,
|
||||
text_style: &TextStyle,
|
||||
// terminal_theme: &TerminalStyle,
|
||||
text_system: &TextSystem,
|
||||
text_system: &WindowTextSystem,
|
||||
hyperlink: Option<(HighlightStyle, &RangeInclusive<AlacPoint>)>,
|
||||
cx: &WindowContext<'_>,
|
||||
) -> (Vec<LayoutCell>, Vec<LayoutRect>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue