perf(skills): raise root scan concurrency

(cherry picked from commit e3db22795107c218f4b98f763522326a979dbbe6)
This commit is contained in:
Adam Perry
2026-07-09 09:52:42 +00:00
parent c6942e78c5
commit 77d52ae727
2 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ use crate::loader::SkillRootSnapshot;
use crate::loader::load_skill_root;
use crate::model::SkillFileSystemsByPath;
const MAX_CONCURRENT_ROOT_SCANS: usize = 4;
const MAX_CONCURRENT_ROOT_SCANS: usize = 5;
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
enum RootScanPriority {

View File

@@ -1,3 +1,4 @@
use std::collections::HashSet;
use std::fs;
use std::path::Path;
use std::path::PathBuf;
@@ -401,11 +402,11 @@ async fn starts_agents_skill_roots_before_other_pending_scans() {
});
file_system.wait_for_walks(MAX_CONCURRENT_ROOT_SCANS).await;
assert_eq!(
file_system.walk_paths(),
file_system.walk_paths().into_iter().collect::<HashSet<_>>(),
agents_roots
.iter()
.map(|root| PathUri::from_host_native_path(root).expect("agents root"))
.collect::<Vec<_>>()
.collect::<HashSet<_>>()
);
walk_gate.add_permits(MAX_CONCURRENT_ROOT_SCANS);