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

Optimize auto prune routine #1208

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SquidXTV
Copy link
Member

@SquidXTV SquidXTV commented Dec 3, 2024

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 all
members 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.

@SquidXTV SquidXTV requested a review from a team as a code owner December 3, 2024 20:16
@SquidXTV SquidXTV changed the title Optimize auto prune routine to not spam requests for all users Optimize auto prune routine Dec 3, 2024
Copy link

sonarqubecloud bot commented Dec 3, 2024

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.

1 participant