From 77d52ae7276d4f016c3bacefe8afdfc0e6373cb3 Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Thu, 9 Jul 2026 09:52:42 +0000 Subject: [PATCH] perf(skills): raise root scan concurrency (cherry picked from commit e3db22795107c218f4b98f763522326a979dbbe6) --- codex-rs/core-skills/src/root_loader.rs | 2 +- codex-rs/core-skills/src/root_loader_tests.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/codex-rs/core-skills/src/root_loader.rs b/codex-rs/core-skills/src/root_loader.rs index 8bb1214ee9..d508e93b52 100644 --- a/codex-rs/core-skills/src/root_loader.rs +++ b/codex-rs/core-skills/src/root_loader.rs @@ -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 { diff --git a/codex-rs/core-skills/src/root_loader_tests.rs b/codex-rs/core-skills/src/root_loader_tests.rs index bad9ebaf45..540573e68e 100644 --- a/codex-rs/core-skills/src/root_loader_tests.rs +++ b/codex-rs/core-skills/src/root_loader_tests.rs @@ -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::>(), agents_roots .iter() .map(|root| PathUri::from_host_native_path(root).expect("agents root")) - .collect::>() + .collect::>() ); walk_gate.add_permits(MAX_CONCURRENT_ROOT_SCANS);