From 0946e768b2af51c97045ec8550fe995e1782fd47 Mon Sep 17 00:00:00 2001 From: Gregory Newman-Smith Date: Tue, 11 Nov 2025 13:27:13 +0000 Subject: [PATCH 1/2] CBG-4747: remove serialisation on critical path --- channels/set.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/channels/set.go b/channels/set.go index 9e9b8f35dc..a1e8fc268b 100644 --- a/channels/set.go +++ b/channels/set.go @@ -38,15 +38,14 @@ type ID struct { } func (c ID) String() string { - return c.serialization + return strconv.FormatUint(uint64(c.CollectionID), 10) + "." + base.UserDataPrefix + c.Name + base.UserDataSuffix } // NewID returns a new ChannelID func NewID(channelName string, collectionID uint32) ID { return ID{ - Name: channelName, - CollectionID: collectionID, - serialization: strconv.FormatUint(uint64(collectionID), 10) + "." + base.UserDataPrefix + channelName + base.UserDataSuffix, + Name: channelName, + CollectionID: collectionID, } } From f61f97561b619b97b6f7b1cc9ec76b31c8cc3b42 Mon Sep 17 00:00:00 2001 From: Gregory Newman-Smith Date: Tue, 11 Nov 2025 13:40:31 +0000 Subject: [PATCH 2/2] remove unused field --- channels/set.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/channels/set.go b/channels/set.go index a1e8fc268b..c98bbae1fc 100644 --- a/channels/set.go +++ b/channels/set.go @@ -32,9 +32,8 @@ const AllChannelWildcard = "*" // wildcard for 'all channels' // ID represents a single channel inside a collection type ID struct { - Name string // name of channel - CollectionID uint32 // collection it belongs to - serialization string // private method for logging and matching inside changeWaiter notification + Name string // name of channel + CollectionID uint32 // collection it belongs to } func (c ID) String() string {