-
Notifications
You must be signed in to change notification settings - Fork 151
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
Publicity sync speedup #1111
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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()
).
There was a problem hiding this comment.
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.
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.