Skip to content

Commit 0946e76

Browse files
committed
CBG-4747: remove serialisation on critical path
1 parent 618bb6a commit 0946e76

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

channels/set.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ type ID struct {
3838
}
3939

4040
func (c ID) String() string {
41-
return c.serialization
41+
return strconv.FormatUint(uint64(c.CollectionID), 10) + "." + base.UserDataPrefix + c.Name + base.UserDataSuffix
4242
}
4343

4444
// NewID returns a new ChannelID
4545
func NewID(channelName string, collectionID uint32) ID {
4646
return ID{
47-
Name: channelName,
48-
CollectionID: collectionID,
49-
serialization: strconv.FormatUint(uint64(collectionID), 10) + "." + base.UserDataPrefix + channelName + base.UserDataSuffix,
47+
Name: channelName,
48+
CollectionID: collectionID,
5049
}
5150
}
5251

0 commit comments

Comments
 (0)