Pre-initialize global rayon threadpool (#41226)
We only use it a handful of times and the default amount of threads (logical cpu core number) its spawns is overkill for this. This also gives the threads names oppose to being labeled `<unknown>` Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -751,6 +751,7 @@ pub struct DisplaySnapshot {
|
||||
diagnostics_max_severity: DiagnosticSeverity,
|
||||
pub(crate) fold_placeholder: FoldPlaceholder,
|
||||
}
|
||||
|
||||
impl DisplaySnapshot {
|
||||
pub fn wrap_snapshot(&self) -> &WrapSnapshot {
|
||||
&self.block_snapshot.wrap_snapshot
|
||||
@@ -1408,6 +1409,14 @@ impl DisplaySnapshot {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Deref for DisplaySnapshot {
|
||||
type Target = BlockSnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.block_snapshot
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Default, Eq, Ord, PartialOrd, PartialEq)]
|
||||
pub struct DisplayPoint(BlockPoint);
|
||||
|
||||
|
||||
@@ -7945,7 +7945,7 @@ impl Editor {
|
||||
|
||||
let snapshot = self.snapshot(window, cx);
|
||||
|
||||
let multi_buffer_snapshot = snapshot.display_snapshot.buffer_snapshot();
|
||||
let multi_buffer_snapshot = snapshot.buffer_snapshot();
|
||||
let Some(project) = self.project() else {
|
||||
return breakpoint_display_points;
|
||||
};
|
||||
@@ -7975,7 +7975,7 @@ impl Editor {
|
||||
let multi_buffer_anchor =
|
||||
Anchor::in_buffer(excerpt_id, buffer_snapshot.remote_id(), breakpoint.position);
|
||||
let position = multi_buffer_anchor
|
||||
.to_point(multi_buffer_snapshot)
|
||||
.to_point(&multi_buffer_snapshot)
|
||||
.to_display_point(&snapshot);
|
||||
|
||||
breakpoint_display_points.insert(
|
||||
|
||||
Reference in New Issue
Block a user