moquette-io / moquette

Java MQTT lightweight broker
http://moquette-io.github.io/moquette/
Apache License 2.0
2.27k stars 814 forks source link

Fixed #633 adding subscriptions #758

Closed hylkevds closed 11 months ago

hylkevds commented 1 year ago

Converted subscription from HashSet to ArrayList

Copying a Set is much slower than copying an ArrayList. Since the slow part in the code is the copy step, using an ArrayList is much faster overall. Since the code using the subscriptions only iterates over them, the change from Set to List makes no real difference.

Fixes #633

hylkevds commented 11 months ago

LGTM Before merging please add a line to Changelog file

I always forget to update my Changelogs :) I've updated it, PR needs a new approve now due to that change.