feat: change fxhash to ahash for hashmaps and hashsets
This commit is contained in:
parent
504f5e54a9
commit
c0fcee71cf
18 changed files with 19 additions and 20 deletions
|
|
@ -31,7 +31,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [
|
|||
|
||||
mimalloc = { version = "*", default-features = false }
|
||||
anyhow = "1.0.95"
|
||||
rustc-hash = "2.1.0"
|
||||
ahash = "0.8.11"
|
||||
serde = { version = "1.0.217", default-features = false, features = ["derive"] }
|
||||
tokio = { version = "1.42.0", default-features = false, features = [
|
||||
"net",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use super::toml::ConfigToml;
|
||||
use crate::error::{anyhow, ensure};
|
||||
use ahash::HashMap;
|
||||
use clap::{Arg, ArgAction};
|
||||
use hot_reload::{ReloaderReceiver, ReloaderService};
|
||||
use rpxy_certs::{build_cert_reloader, CryptoFileSourceBuilder, CryptoReloader, ServerCryptoBase};
|
||||
use rpxy_lib::{AppConfig, AppConfigList, ProxyConfig};
|
||||
use rustc_hash::FxHashMap as HashMap;
|
||||
|
||||
#[cfg(feature = "acme")]
|
||||
use rpxy_acme::{AcmeManager, ACME_DIR_URL, ACME_REGISTRY_PATH};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use crate::{
|
|||
error::{anyhow, ensure},
|
||||
log::warn,
|
||||
};
|
||||
use ahash::HashMap;
|
||||
use rpxy_lib::{reexports::Uri, AppConfig, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri};
|
||||
use rustc_hash::FxHashMap as HashMap;
|
||||
use serde::Deserialize;
|
||||
use std::{fs, net::SocketAddr};
|
||||
use tokio::time::Duration;
|
||||
|
|
@ -232,7 +232,7 @@ impl ConfigToml {
|
|||
|
||||
// Check unused fields during deserialization
|
||||
let t = toml::de::Deserializer::new(&config_str);
|
||||
let mut unused = rustc_hash::FxHashSet::default();
|
||||
let mut unused = ahash::HashSet::default();
|
||||
|
||||
let res = serde_ignored::deserialize(t, |path| {
|
||||
unused.insert(path.to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue