Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #633 adding subscriptions #758

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

hylkevds
Copy link
Collaborator

@hylkevds hylkevds commented Jun 21, 2023

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 hylkevds changed the title Fix #633 adding subscriptions Fixed #633 adding subscriptions Jun 21, 2023
@andsel andsel self-requested a review July 21, 2023 12:01
andsel
andsel previously approved these changes Jul 21, 2023
Copy link
Collaborator

@andsel andsel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Before merging please add a line to Changelog file

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.
@hylkevds
Copy link
Collaborator Author

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.

@hylkevds hylkevds requested a review from andsel July 21, 2023 13:22
@andsel andsel merged commit 8e816a3 into moquette-io:main Jul 31, 2023
4 checks passed
@hylkevds hylkevds deleted the fix633_addingSubscriptions branch April 30, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants