mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
perf(skills): raise root scan concurrency
(cherry picked from commit e3db22795107c218f4b98f763522326a979dbbe6)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user