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

Publicity sync speedup #1111

Merged
merged 9 commits into from
Aug 15, 2020
Merged

Publicity sync speedup #1111

merged 9 commits into from
Aug 15, 2020

Conversation

Half-Shot
Copy link
Contributor

Currently we do a O(N) operation across all bridged channels if any of the modes change, which while safe was becoming computationally far too expensive to use.

This change makes it so that we only compute the publicity changes for the channel being changed, which should be safe enough.

@Half-Shot Half-Shot requested a review from a team August 14, 2020 12:39
Copy link
Member

@benparsons benparsons left a comment

Choose a reason for hiding this comment

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

lgtm, one comment but I think it's nbd

@@ -454,6 +452,8 @@ export class IrcBridge {
this.ircServers.push(server);
}

this.clientPool = new ClientPool(this, this.dataStore);
Copy link
Member

Choose a reason for hiding this comment

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

I don't see why move this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it has a (somewhat hard to see) dependency on the configured server list (provided by IrcBridge.getServers()).

Copy link
Contributor Author

@Half-Shot Half-Shot Aug 14, 2020

Choose a reason for hiding this comment

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

Oh except I failed to mention that this PR has a dependency on #1091, which is where the change came from.

@Half-Shot Half-Shot merged commit c689f2d into develop Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants