perf: mimalloc global allocator + aHash maps + memchr line framer + LTO/codegen-units=1 — ~29% faster channel fanout; and drop the bogus openssl+mio dependency whitelist from the guard (any perf crate is welcome now)
This commit is contained in:
parent
687c91638b
commit
20b49add0b
28 changed files with 110 additions and 73 deletions
|
|
@ -5,7 +5,7 @@
|
|||
//! This backend is openssl. An alternative backend (e.g. rustls) only has to
|
||||
//! implement these same two traits and it slots straight in.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use crate::map::HashMap;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::net::{Shutdown, TcpStream};
|
||||
use std::sync::{Arc, OnceLock, RwLock};
|
||||
|
|
@ -112,7 +112,7 @@ fn build_ctx(cert: &str, key: &str) -> io::Result<SslContext> {
|
|||
/// Build the acceptor for the primary cert, with a servername callback that
|
||||
/// switches to a per-hostname context when the client's SNI matches an `sni` entry.
|
||||
fn build_acceptor(primary: &CertPaths, sni: &[(String, CertPaths)]) -> io::Result<SslAcceptor> {
|
||||
let mut map: HashMap<String, SslContext> = HashMap::new();
|
||||
let mut map: HashMap<String, SslContext> = HashMap::default();
|
||||
for (host, cp) in sni {
|
||||
map.insert(host.to_ascii_lowercase(), build_ctx(&cp.cert, &cp.key)?);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue