From a19cd9cd7878784d10f21730aac2ac94ac30a353 Mon Sep 17 00:00:00 2001 From: Naxdy Date: Wed, 3 Apr 2024 18:14:39 +0200 Subject: [PATCH] add opt level notice --- Cargo.toml | 4 +++- src/input.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dcd1b66..e1cc914 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,9 @@ debug = 2 debug-assertions = false incremental = false lto = 'fat' -opt-level = 1 +# opt level needs to be benchmarked after every major feature +# due to the changes in binary size and alignment +opt-level = 2 overflow-checks = false # do not optimize proc-macro crates = faster builds from scratch diff --git a/src/input.rs b/src/input.rs index b3517dc..2e2a759 100644 --- a/src/input.rs +++ b/src/input.rs @@ -584,8 +584,8 @@ pub async fn update_stick_states_task( SIGNAL_STICK_STATE.signal(current_stick_state.clone()); - ticker.next().await; yield_now().await; + ticker.next().await; if let Some(new_config) = SIGNAL_CONFIG_CHANGE.try_take() { controller_config = new_config;