Show More
@@ -47,6 +47,17 b" pub fn status<'tree, 'on_disk: 'tree>(" | |||
|
47 | 47 | ignore_files: Vec<PathBuf>, |
|
48 | 48 | options: StatusOptions, |
|
49 | 49 | ) -> Result<(DirstateStatus<'on_disk>, Vec<PatternFileWarning>), StatusError> { |
|
50 | // Force the global rayon threadpool to not exceed 16 concurrent threads. | |
|
51 | // This is a stop-gap measure until we figure out why using more than 16 | |
|
52 | // threads makes `status` slower for each additional thread. | |
|
53 | // We use `ok()` in case the global threadpool has already been instantiated | |
|
54 | // in `rhg` or some other caller. | |
|
55 | // TODO find the underlying cause and fix it, then remove this. | |
|
56 | rayon::ThreadPoolBuilder::new() | |
|
57 | .num_threads(16) | |
|
58 | .build_global() | |
|
59 | .ok(); | |
|
60 | ||
|
50 | 61 | let (ignore_fn, warnings, patterns_changed): (IgnoreFnType, _, _) = |
|
51 | 62 | if options.list_ignored || options.list_unknown { |
|
52 | 63 | let mut hasher = Sha1::new(); |
General Comments 0
You need to be logged in to leave comments.
Login now