You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where for the 'heuristic', I expected something along the lines of num_cpus. I can confirm setting threads to num_cpus::get(), 12 in my case, yields results as expected.
Could/should this be used as the heuristic? It is a substantial, free win in my case.
If not, then the docs should probably be adjusted.
The text was updated successfully, but these errors were encountered:
Please tick this box to confirm you have reviewed the above.
What version of ripgrep are you using?
ignore = "0.4.22"
How did you install ripgrep?
n/a
What operating system are you using ripgrep on?
n/a
Describe your bug.
I'm using
WalkParallel
for, well, parallel, recursive directory traversal. There's athreads
parameter which I left unspecified (usingWalkBuilder
):ripgrep/crates/ignore/src/walk.rs
Line 1196 in 71d71d2
The docs say if left unspecified, aka at
0
, the number of threads will be picked based on heuristics:ripgrep/crates/ignore/src/walk.rs
Lines 643 to 644 in 71d71d2
What are the steps to reproduce the behavior?
Execute
What is the actual behavior?
Using these settings, I noticed my application using 200% CPU, where more cores would have been available.
What is the expected behavior?
Processing to use more threads, as determined by the heuristics.
It turns out,
threads
is hard-coded to 2 if unspecified:ripgrep/crates/ignore/src/walk.rs
Lines 1307 to 1308 in 71d71d2
where for the 'heuristic', I expected something along the lines of
num_cpus
. I can confirm settingthreads
tonum_cpus::get()
, 12 in my case, yields results as expected.Could/should this be used as the heuristic? It is a substantial, free win in my case.
If not, then the docs should probably be adjusted.
The text was updated successfully, but these errors were encountered: