mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-04 04:23:21 +01:00
editor: Put more syntax walking features on the background (#48450)
Currently we always compute breadcrumbs and sticky headers on every editor paint which is not cheap to do especially in bigger files, moving this off to be computed on event handling where they change and then caching them can save serveral milliseconds per render in bigger files. This also puts matching brackets refreshing and document highlights on a background task, as this tends to block the main task for prolonged time as well. Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
1 parent
81562a30c7
commit
9cd2343432
16 files changed
+157
-109
No files matched your search
@@ -13,7 +13,6 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
};
|
||||
use theme;
|
||||
use ui::{Color, Icon, IconName, Label, LabelCommon as _};
|
||||
use util::paths::PathStyle;
|
||||
use util::rel_path::RelPath;
|
||||
@@ -339,8 +338,8 @@ impl Item for MultiDiffView {
|
||||
ToolbarItemLocation::PrimaryLeft
|
||||
}
|
||||
|
||||
fn breadcrumbs(&self, theme: &theme::Theme, cx: &App) -> Option<Vec<BreadcrumbText>> {
|
||||
self.editor.breadcrumbs(theme, cx)
|
||||
fn breadcrumbs(&self, cx: &App) -> Option<Vec<BreadcrumbText>> {
|
||||
self.editor.breadcrumbs(cx)
|
||||
}
|
||||
|
||||
fn added_to_workspace(
|
||||
|
||||
Reference in new issue
Block a user