mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #239 from nuss-justin/remove-allocation-2
Remove allocation when inserting into sublist
This commit is contained in:
@@ -83,7 +83,7 @@ func NewSublist() *Sublist {
|
||||
// Insert adds a subscription into the sublist
|
||||
func (s *Sublist) Insert(sub *subscription) error {
|
||||
// copy the subject since we hold this and this might be part of a large byte slice.
|
||||
subject := string(append([]byte(nil), sub.subject...))
|
||||
subject := string(sub.subject)
|
||||
tsa := [32]string{}
|
||||
tokens := tsa[:0]
|
||||
start := 0
|
||||
|
||||
Reference in New Issue
Block a user