Use synchronous source walking for WASM rescans

This commit is contained in:
kevin.krausse 2026-09-11 19:39:13 -07:00
parent ff2cc6e2e6
commit 11050dda2c

View file

@ -382,9 +382,10 @@ impl Scanner {
return (vec![], vec![], vec![]);
};
// Use synchronous walk for the initial build (lower overhead) and parallel
// walk for subsequent calls (watch mode) where the overhead is amortised.
let all_entries = if self.has_scanned_once {
// Use synchronous walk for the initial build (lower overhead). On supported
// platforms, use the parallel walk for subsequent calls where the overhead
// is amortised.
let all_entries = if self.has_scanned_once && cfg!(any(unix, windows)) {
walk_parallel(walker)
} else {
walk_synchronous(walker)