mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
perf: refactor IRuntime to use HashSet for exists_keys and improve related functions performance
This commit is contained in:
@@ -9,7 +9,7 @@ use anyhow::{Result, anyhow};
|
||||
use clash_verge_logging::{Type, logging};
|
||||
use clash_verge_types::runtime::IRuntime;
|
||||
use smartstring::alias::String;
|
||||
use std::{path::PathBuf, time::Instant};
|
||||
use std::{collections::HashSet, path::PathBuf, time::Instant};
|
||||
use tauri_plugin_mihomo::Error as MihomoError;
|
||||
|
||||
impl CoreManager {
|
||||
@@ -22,7 +22,7 @@ impl CoreManager {
|
||||
Config::runtime().await.edit_draft(|d| {
|
||||
*d = IRuntime {
|
||||
config: Some(clash_config.to_owned()),
|
||||
exists_keys: vec![],
|
||||
exists_keys: HashSet::new(),
|
||||
chain_logs: Default::default(),
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user