-
-
Notifications
You must be signed in to change notification settings - Fork 89
Optimize auto prune routine #1208
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
base: develop
Are you sure you want to change the base?
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.
Can you change the logic to fallback on the previous behavior or similar when loading fails?
I want to prevent that when "loading all users" fails for whatever reason that this means it fails for all categories.
Currently, if I get this right, when there is a problem with one category it will still attempt it for the other categories individually.
You sure that this is needed? |
2133a8e
to
cea6143
Compare
|
About
In order to keep helper roles below 250 users, we have a routine that removes a role from a more inactive user.
The old implementation used
Guild#findMembersWithRoles
to filter for them, which surprisingly requests allmembers first and does the filtering on the client. This happens for each role (about 17). So we basically query the same
content multiple times. The new implementation requests all members beforehand and then reusing it to prune roles if needed.
This is related to the issue about a
TimeoutException
on the member chunk requests when requesting all members. This doesn't mean it is going to fix that issue, but it is still an optimization.