mirror of
https://github.com/layue13/MoonBridge.git
synced 2026-10-25 18:46:18 +00:00
- WebSocketFrameAdapter:flush 前写入的字节用 CoalescingBufferQueue 合并为一条 BinaryWebSocketFrame,最大 64 KiB。之前每个 Minecraft 帧一条消息,而 Netty 的编码器对 小于 1 KiB 的消息每条都分配并复制一次。每次写入的 promise 在承载它的消息写出时完成; 未 flush 的写入在关闭时失败并释放;排队字节计入通道可写性。入站不变 - ProxySessionBenchmark:新增 --websocket 1,代理阶段客户端走 ws:// - 记录 testing/benchmarks/results/2026-10-22-websocket-coalescing:burst32 每帧 CPU 低 21% 且范围不重叠、吞吐更高;window 1 无变化;window 16 噪声大,补跑 3 对后合计无回退。 满足事先规则,采用 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>