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
|
@ -3,7 +3,7 @@
|
|||
|
||||
use super::{Bias, DisplayPoint, DisplaySnapshot, SelectionGoal, ToDisplayPoint};
|
||||
use crate::{char_kind, CharKind, EditorStyle, ToOffset, ToPoint};
|
||||
use gpui::{px, Pixels, TextSystem};
|
||||
use gpui::{px, Pixels, WindowTextSystem};
|
||||
use language::Point;
|
||||
|
||||
use std::{ops::Range, sync::Arc};
|
||||
|
@ -22,7 +22,7 @@ pub enum FindRange {
|
|||
/// TextLayoutDetails encompasses everything we need to move vertically
|
||||
/// taking into account variable width characters.
|
||||
pub struct TextLayoutDetails {
|
||||
pub(crate) text_system: Arc<TextSystem>,
|
||||
pub(crate) text_system: Arc<WindowTextSystem>,
|
||||
pub(crate) editor_style: EditorStyle,
|
||||
pub(crate) rem_size: Pixels,
|
||||
pub anchor: Anchor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue