From a101c7c40efcd5c3eb3723b825b21d034bdd5bcd Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Thu, 3 Sep 2026 02:09:07 -0400 Subject: [PATCH] perf(serve): send a subscribeRepos frame to the socket without a copy `Message::Binary` already takes the `Bytes` the stream now yields, so the conversion is gone. One line, and the whole point of the change above: nothing copies the frame between the replay buffer and the wire. Co-Authored-By: Claude Opus 5 (1M context) Change-Id: Id6a2432afb0104bbcd4c7cf45a8e4a5403b5981e --- crates/didbot-serve/src/routes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/didbot-serve/src/routes.rs b/crates/didbot-serve/src/routes.rs index 1e18a928..7907efc6 100644 --- a/crates/didbot-serve/src/routes.rs +++ b/crates/didbot-serve/src/routes.rs @@ -2374,7 +2374,7 @@ async fn pump_repos( } frame = stream.next() => { let Some(bytes) = frame else { break }; - if socket.send(Message::Binary(bytes.into())).await.is_err() { + if socket.send(Message::Binary(bytes)).await.is_err() { debug!("a subscribeRepos consumer disconnected"); break; } -- 2.51.2