mirror of
https://github.com/openai/codex.git
synced 2026-12-01 00:20:48 +00:00
Tune file search defaults from eval sweep
This commit is contained in:
@@ -15,8 +15,8 @@ use tracing::warn;
|
||||
|
||||
use crate::outgoing_message::OutgoingMessageSender;
|
||||
|
||||
const MATCH_LIMIT: usize = 50;
|
||||
const MAX_THREADS: usize = 12;
|
||||
const MATCH_LIMIT: usize = 100;
|
||||
const MAX_THREADS: usize = 8;
|
||||
|
||||
pub(crate) async fn run_fuzzy_file_search(
|
||||
query: String,
|
||||
|
||||
@@ -13,7 +13,7 @@ pub struct Cli {
|
||||
pub json: bool,
|
||||
|
||||
/// Maximum number of results to return.
|
||||
#[clap(long, short = 'l', default_value = "64")]
|
||||
#[clap(long, short = 'l', default_value = "100")]
|
||||
pub limit: NonZero<usize>,
|
||||
|
||||
/// Directory to search.
|
||||
@@ -25,12 +25,11 @@ pub struct Cli {
|
||||
pub compute_indices: bool,
|
||||
|
||||
// While it is common to default to the number of logical CPUs when creating
|
||||
// a thread pool, empirically, the I/O of the filetree traversal offers
|
||||
// limited parallelism and is the bottleneck, so using a smaller number of
|
||||
// threads is more efficient. (Empirically, using more than 2 threads doesn't seem to provide much benefit.)
|
||||
// a thread pool, empirically, 8 worker threads was the fastest setting in
|
||||
// local monorepo evals among the best-performing quality tiers.
|
||||
//
|
||||
/// Number of worker threads to use.
|
||||
#[clap(long, default_value = "2")]
|
||||
#[clap(long, default_value = "8")]
|
||||
pub threads: NonZero<usize>,
|
||||
|
||||
/// Exclude patterns
|
||||
|
||||
@@ -116,10 +116,10 @@ impl Default for FileSearchOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
#[expect(clippy::unwrap_used)]
|
||||
limit: NonZero::new(20).unwrap(),
|
||||
limit: NonZero::new(100).unwrap(),
|
||||
exclude: Vec::new(),
|
||||
#[expect(clippy::unwrap_used)]
|
||||
threads: NonZero::new(2).unwrap(),
|
||||
threads: NonZero::new(8).unwrap(),
|
||||
compute_indices: false,
|
||||
respect_gitignore: true,
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ use std::sync::Mutex;
|
||||
use crate::app_event::AppEvent;
|
||||
use crate::app_event_sender::AppEventSender;
|
||||
|
||||
const FILE_SEARCH_LIMIT: usize = 50;
|
||||
const FILE_SEARCH_LIMIT: usize = 100;
|
||||
|
||||
pub(crate) struct FileSearchManager {
|
||||
state: Arc<Mutex<SearchState>>,
|
||||
|
||||
@@ -14,7 +14,7 @@ use std::sync::Mutex;
|
||||
use crate::app_event::AppEvent;
|
||||
use crate::app_event_sender::AppEventSender;
|
||||
|
||||
const FILE_SEARCH_LIMIT: usize = 50;
|
||||
const FILE_SEARCH_LIMIT: usize = 100;
|
||||
|
||||
pub(crate) struct FileSearchManager {
|
||||
state: Arc<Mutex<SearchState>>,
|
||||
|
||||
Reference in New Issue
Block a user