Added prefetch
This commit is contained in:
@@ -34,11 +34,15 @@ impl WatchedTree {
|
||||
let (change_tx, _) = broadcast::channel(BROADCAST_CAPACITY);
|
||||
|
||||
// Build snapshot, collect the absolute paths that were walked so we can watch them.
|
||||
info!("WatchedTree: walking '{}' (depth {})…", root.display(), INITIAL_DEPTH);
|
||||
let t = std::time::Instant::now();
|
||||
let watched_dirs = walk_tree(&root, INITIAL_DEPTH, &snapshot).await;
|
||||
let snap_len = snapshot.read().await.len();
|
||||
info!(
|
||||
"WatchedTree: snapshot ready ({} directories, {} inotify watches)",
|
||||
snapshot.read().await.len(),
|
||||
"WatchedTree: snapshot ready — {} directories, {} inotify watches, took {:.1}s",
|
||||
snap_len,
|
||||
watched_dirs.len(),
|
||||
t.elapsed().as_secs_f32(),
|
||||
);
|
||||
|
||||
// Bridge notify's sync callback → async tokio task.
|
||||
|
||||
Reference in New Issue
Block a user