Skip to content

Commit 2702d34

Browse files
committed
perf(pm): source resolver mainloop architecture
1 parent f2f4c53 commit 2702d34

17 files changed

Lines changed: 2064 additions & 1256 deletions

File tree

crates/pm/src/service/pipeline/receiver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ mod tests {
123123
}));
124124

125125
// Should not forward other events
126-
receiver.on_event(BuildEvent::PreloadStart { count: 10 });
126+
receiver.on_event(BuildEvent::LevelStart { node_count: 10 });
127127

128128
// Only one message should be in the download channel
129129
assert!(channels.download_rx.try_recv().is_ok());

crates/pm/src/util/logger.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -219,21 +219,6 @@ impl utoo_ruborist::progress::EventReceiver for ProgressReceiver {
219219
}
220220
use utoo_ruborist::progress::BuildEvent;
221221
match event {
222-
BuildEvent::PreloadStart { count } | BuildEvent::PreloadQueued { count } => {
223-
PROGRESS_BAR.inc_length(count as u64);
224-
}
225-
BuildEvent::PreloadFetching { name } => {
226-
log_progress(&format!("fetching {}", name));
227-
}
228-
BuildEvent::PreloadProgress { name, .. } => {
229-
PROGRESS_BAR.inc(1);
230-
log_progress(&format!("resolved {}", name));
231-
}
232-
BuildEvent::PreloadComplete { success, failed } => {
233-
PROGRESS_BAR.set_position(0);
234-
PROGRESS_BAR.set_length(0);
235-
log_progress(&format!("preload: {} ok, {} failed", success, failed));
236-
}
237222
BuildEvent::DependencyCount { count } => {
238223
PROGRESS_BAR.inc_length(count as u64);
239224
}

crates/ruborist/src/model/manifest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ impl FullManifest {
128128
/// subtree is visited in place — no intermediate `serde_json::Value`
129129
/// allocation.
130130
///
131-
/// `OnceMap` single-flight in `UnifiedRegistry` reduces the per-key
132-
/// invocation count to one, so the per-call full-tree parse cost is
133-
/// bounded.
131+
/// The BFS resolver de-duplicates in-flight extract jobs per key, so the
132+
/// per-call full-tree parse cost is bounded.
134133
fn extract_version<T: for<'de> Deserialize<'de>>(&self, version: &str) -> Option<T> {
135134
use simd_json::prelude::ValueObjectAccess;
136135
let mut buf = self.raw.to_vec();

crates/ruborist/src/model/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
//! cloning at every cache read and graph insertion:
7272
//!
7373
//! ```text
74-
//! MemoryCache ──┐
75-
//! ├── Arc<CoreVersionManifest> ── (ref-count clone)
76-
//! PackageNode ──┘
74+
//! ManifestState ──┐
75+
//! ├── Arc<CoreVersionManifest> ── (ref-count clone)
76+
//! PackageNode ────
7777
//!
7878
//! Cold paths (disk I/O, serde) still use owned CoreVersionManifest,
7979
//! wrapping in Arc::new() at the boundary.

0 commit comments

Comments
 (0)