Skip to content

Commit

Permalink
watchman: use single-threaded async runtime
Browse files Browse the repository at this point in the history
The `#[tokio::main]` annotation uses a multi-threaded runtime by
default. We don't need that for querying watchman. Switching to the
single-threaded runtime saves about 20 ms.
  • Loading branch information
martinvonz committed Sep 24, 2023
1 parent ca6371c commit 9d8be29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ impl TreeState {
}

#[cfg(feature = "watchman")]
#[tokio::main]
#[tokio::main(flavor = "current_thread")]
#[instrument(skip(self))]
pub async fn query_watchman(
&self,
Expand Down

0 comments on commit 9d8be29

Please sign in to comment.