Instead of building a new serialized message for each recipient,
try to cache them.
This commit is contained in:
Shivaram Lingamneni 2020-11-27 00:13:47 -05:00
parent f04648e081
commit ec15d367ba
6 changed files with 249 additions and 20 deletions

View file

@ -127,7 +127,7 @@ func (rb *ResponseBuffer) AddSplitMessageFromClient(fromNickMask string, fromAcc
}
} else {
if rb.session.capabilities.Has(caps.Multiline) {
batch := rb.session.composeMultilineBatch(fromNickMask, fromAccount, tags, command, target, message)
batch := composeMultilineBatch(rb.session.generateBatchID(), fromNickMask, fromAccount, tags, command, target, message)
rb.setNestedBatchTag(&batch[0])
rb.setNestedBatchTag(&batch[len(batch)-1])
rb.messages = append(rb.messages, batch...)