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

Optimized "blocked" command #3242

Merged
merged 1 commit into from
Jan 21, 2023
Merged

Optimized "blocked" command #3242

merged 1 commit into from
Jan 21, 2023

Conversation

khakers
Copy link
Contributor

@khakers khakers commented Jan 20, 2023

This fixes the issues those with large blocklists were having when attempting to use the blocked command. Tested with 15k blocked user and had no performance problems (besides the memory usage going up by over 20MB).

There are some more optimizations I can make to this method that'll either end up being adding to this PR or done in the future separately depending on my time constraints.

We already have all the information we need to mention a user (their
id) and fetching the information from discord will lead to rate
limiting and extremely poor performance on large block lists for
no gain.
@Taaku18 Taaku18 changed the base branch from master to development January 20, 2023 18:59
@lorenzo132
Copy link
Member

Can confirm this solves the issue

@StephenDaDev
Copy link
Member

Also confirmed

@Taaku18 Taaku18 merged commit 485ab5a into modmail-dev:development Jan 21, 2023
@Taaku18 Taaku18 mentioned this pull request Jul 15, 2023
raidensakura pushed a commit to raidensakura/modmail that referenced this pull request Apr 10, 2024
We already have all the information we need to mention a user (their
id) and fetching the information from discord will lead to rate
limiting and extremely poor performance on large block lists for
no gain.
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.

4 participants