Skip to content

Commit 226eafb

Browse files
committed
Revert "fix(build): update bloat thresholds to reflect post-relay baseline"
This reverts commit c5c2be9.
1 parent c5c2be9 commit 226eafb

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

bench/check_bloat.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ cd "$ROOT_DIR"
2222

2323
# --- Size thresholds (bytes) ---
2424
# DO NOT BUMP WITHOUT PERMISSION.
25-
# Updated: 2026-03-16, baseline: v0.8.1 + relay fix + vergen
26-
# Slim grew from auto-negotiation + relay monomorphization (see bench/results/bloat_20260301_analysis.txt).
27-
# Real fix requires core-level ErasedTransport refactor (tracked in TODO).
25+
# Updated: 2026-03-15, baseline: worktree-mcp-server
26+
# slim threshold = exactly 5MiB (5 * 1024 * 1024). Must stay "5MB slim".
27+
# default threshold = existing measured + ~1% headroom.
2828
declare -A THRESHOLDS=(
2929
# musl x86_64 — PRIMARY build target
30-
["slim-musl"]=5505024 # 5.25MiB; current: ~5.35M
31-
["default-musl"]=7500000 # current: ~7.1M (~5% headroom)
30+
["slim-musl"]=5242880 # 5 * 1024 * 1024; current: 5216712
31+
["default-musl"]=7210000 # current: 7136648 (~1% headroom)
3232
# glibc x86_64 — sanity check only
33-
["slim-glibc"]=5505024 # 5.25MiB; current: ~5.35M
34-
["default-glibc"]=7500000 # current: ~7.1M (~5% headroom)
33+
["slim-glibc"]=5242880 # 5 * 1024 * 1024; current: 5241936
34+
["default-glibc"]=7215000 # current: 7143368 (~1% headroom)
3535
)
3636

3737
# --- Build definitions ---

crates/daemon/src/transport.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,21 @@ pub(crate) fn relay_bridge_channels(
151151
});
152152
}
153153

154-
/// Spawn the relay instruction fan-out task for a source connection.
154+
/// Spawn the relay fan-out task for a source connection.
155155
///
156-
/// Reads instructions from `source_rx` and forwards a clone of each to all
157-
/// currently-registered peer senders. Returns a registration channel: callers
158-
/// send a new `Sender` for each exit peer that connects.
159-
pub(crate) fn spawn_fanout_task(
160-
source_rx: mpsc::Receiver<wallhack_wire::data::EntryNodeInstruction>,
161-
) -> mpsc::UnboundedSender<mpsc::Sender<wallhack_wire::data::EntryNodeInstruction>> {
162-
let (register_tx, mut register_rx) =
163-
mpsc::unbounded_channel::<mpsc::Sender<wallhack_wire::data::EntryNodeInstruction>>();
156+
/// The fan-out task reads items from `source_rx` and forwards a clone of each
157+
/// to all currently-registered peer senders. Returns a registration channel:
158+
/// callers send a new `mpsc::Sender<T>` for each peer that connects.
159+
pub(crate) fn spawn_fanout_task<T>(
160+
source_rx: mpsc::Receiver<T>,
161+
) -> mpsc::UnboundedSender<mpsc::Sender<T>>
162+
where
163+
T: Clone + Send + 'static,
164+
{
165+
let (register_tx, mut register_rx) = mpsc::unbounded_channel::<mpsc::Sender<T>>();
164166

165167
tokio::spawn(async move {
166-
let mut peers: Vec<mpsc::Sender<wallhack_wire::data::EntryNodeInstruction>> = Vec::new();
168+
let mut peers: Vec<mpsc::Sender<T>> = Vec::new();
167169
let mut source_rx = source_rx;
168170

169171
loop {

0 commit comments

Comments
 (0)