refactor: reduce disk usage for proxy data sharing

This commit is contained in:
zhom
2025-12-21 13:23:33 +04:00
parent 55974d17be
commit cc74589243
3 changed files with 466 additions and 31 deletions
+2 -6
View File
@@ -249,12 +249,8 @@ async fn is_geoip_database_available() -> Result<bool, String> {
#[tauri::command]
async fn get_all_traffic_snapshots() -> Result<Vec<crate::traffic_stats::TrafficSnapshot>, String> {
Ok(
crate::traffic_stats::list_traffic_stats()
.into_iter()
.map(|s| s.to_snapshot())
.collect(),
)
// Use real-time snapshots that merge in-memory data with disk data
Ok(crate::traffic_stats::get_all_traffic_snapshots_realtime())
}
#[tauri::command]