refactor: reduce cpu usage for proxies

This commit is contained in:
zhom
2025-12-02 22:30:40 +04:00
parent ef00c59063
commit 57ead61139
5 changed files with 148 additions and 88 deletions
+2 -1
View File
@@ -594,7 +594,8 @@ pub fn run() {
// Periodically broadcast browser running status to the frontend
let app_handle_status = app.handle().clone();
tauri::async_runtime::spawn(async move {
let mut interval = tokio::time::interval(tokio::time::Duration::from_millis(500));
let mut interval = tokio::time::interval(tokio::time::Duration::from_secs(5));
interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip);
let mut last_running_states: std::collections::HashMap<String, bool> =
std::collections::HashMap::new();