mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 11:13:12 -06:00
Preallocate array
This commit is contained in:
parent
94a194541d
commit
329d1013f1
|
|
@ -146,7 +146,7 @@ func (s *OutputRoomEventConsumer) processInboundPeek(orp api.OutputNewInboundPee
|
|||
// processMessage updates the list of currently joined hosts in the room
|
||||
// and then sends the event to the hosts that were joined before the event.
|
||||
func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent) error {
|
||||
addsStateEvents := []*gomatrixserverlib.HeaderedEvent{}
|
||||
addsStateEvents := make([]*gomatrixserverlib.HeaderedEvent, 0, len(ore.AddsStateEventIDs))
|
||||
missingEventIDs := make([]string, 0, len(ore.AddsStateEventIDs))
|
||||
for _, eventID := range ore.AddsStateEventIDs {
|
||||
if eventID == ore.Event.EventID() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue