Quick answer: Godot 4 network bandwidth doubled after enabling debug prints on RPC arrival? Print runs on the network thread; the I/O blocks; backlog grows - debug to a ring buffer instead.

Production build: 200KB/s. Add 'print(value)' to an RPC handler; bandwidth becomes 800KB/s due to backlog.

Print to ring buffer

Append to a 1MB rotating buffer; flush periodically. I/O cost amortized.

Or sample

Print 1 in 100 RPCs. Statistical view; not per-event.

Disable print in shipping

Wrap in if OS.is_debug_build(). Strip in release.

“I/O on the network thread is a backpressure source.”

Network handlers should be I/O-free. Logging via a queue + worker thread is the safe pattern.

Related reading