perf: remove hot-path slog.Info from SSE event delivery (#2929)

Tai Groot created

The sendEvent client helper and server SSE handler both eagerly
fmt.Sprintf'd full event payloads on every event. During streaming
this caused hundreds of allocations/sec per client, adding multi-second
lag to the second connected instance.

Assisted-by: Crush:AWS Claude Opus 4.6

Change summary

internal/client/proto.go | 1 -
internal/server/proto.go | 1 -
2 files changed, 2 deletions(-)

Detailed changes

internal/client/proto.go 🔗

@@ -179,7 +179,6 @@ func (c *Client) SubscribeEvents(ctx context.Context, id string) (<-chan any, er
 }
 
 func sendEvent(ctx context.Context, evc chan any, ev any) {
-	slog.Info("Event received", "event", fmt.Sprintf("%T %+v", ev, ev))
 	select {
 	case evc <- ev:
 	case <-ctx.Done():

internal/server/proto.go 🔗

@@ -218,7 +218,6 @@ func (c *controllerV1) handleGetWorkspaceEvents(w http.ResponseWriter, r *http.R
 			if !ok {
 				return
 			}
-			c.server.logDebug(r, "Sending event", "event", fmt.Sprintf("%T %+v", ev.Payload, ev.Payload))
 			wrapped := wrapEvent(ev.Payload)
 			if wrapped == nil {
 				continue