[MIRROR ONLY] A correct and efficient ATProto blob proxy for secure content delivery. codeberg.org/Blooym/porxie
36
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf: use jemalloc over system allocator

Lyna 267d25c0 99d2099f

+30
+21
Cargo.lock
··· 1873 1873 ] 1874 1874 1875 1875 [[package]] 1876 + name = "jemalloc-sys" 1877 + version = "0.5.4+5.3.0-patched" 1878 + source = "registry+https://github.com/rust-lang/crates.io-index" 1879 + checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" 1880 + dependencies = [ 1881 + "cc", 1882 + "libc", 1883 + ] 1884 + 1885 + [[package]] 1886 + name = "jemallocator" 1887 + version = "0.5.4" 1888 + source = "registry+https://github.com/rust-lang/crates.io-index" 1889 + checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" 1890 + dependencies = [ 1891 + "jemalloc-sys", 1892 + "libc", 1893 + ] 1894 + 1895 + [[package]] 1876 1896 name = "jobserver" 1877 1897 version = "0.1.34" 1878 1898 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2423 2443 "infer", 2424 2444 "jacquard-common", 2425 2445 "jacquard-identity", 2446 + "jemallocator", 2426 2447 "json-subscriber", 2427 2448 "mime", 2428 2449 "moka",
+1
Cargo.toml
··· 49 49 infer = { version = "0.19.0", default-features = false, features = ["std"] } 50 50 jacquard-common = { version = "0.9.5", default-features = false } 51 51 jacquard-identity = { version = "0.9.5", features = ["tracing"] } 52 + jemallocator = "0.5.4" 52 53 json-subscriber = { version = "0.2.8", default-features = false, features = [ 53 54 "tracing-log", 54 55 "env-filter",
+8
src/main.rs
··· 38 38 use tracing::Level; 39 39 use tracing_subscriber::EnvFilter; 40 40 41 + // Jemalloc seems to perform better compared to most system allocators, 42 + // especially with multi-threading and long-lived variable-sized 43 + // allocations. 44 + // 45 + // It especially performs a lot better on MUSL (when last benchmarked). 46 + #[global_allocator] 47 + static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; 48 + 41 49 #[derive(Debug, Clone)] 42 50 enum AddressType { 43 51 /// An IP socket address.