perf(group): reduce websocket fanout serialization

This commit is contained in:
richjohnrambo
2026-10-04 10:15:18 +08:00
parent c46209f4e7
commit b05e8f60dd
10 changed files with 458 additions and 2 deletions
+3
View File
@@ -881,6 +881,8 @@ type ServerComMessage struct {
PreserveTopicName bool `json:"-"`
// User id affected by this message.
uid types.Uid
// Timestamp when this message entered a master-to-proxy multiplex queue.
clusterQueuedAt time.Time
}
// Deep-shallow copy of ServerComMessage. Deep copy of service fields,
@@ -899,6 +901,7 @@ func (src *ServerComMessage) copy() *ServerComMessage {
SkipSid: src.SkipSid,
PreserveTopicName: src.PreserveTopicName,
uid: src.uid,
clusterQueuedAt: src.clusterQueuedAt,
}
dst.Ctrl = src.Ctrl.copy()