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

Lazy fetching in countryballs iterator #75

Open
laggron42 opened this issue Apr 20, 2023 · 2 comments
Open

Lazy fetching in countryballs iterator #75

laggron42 opened this issue Apr 20, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request package:players Package with /player commands priority:high

Comments

@laggron42
Copy link
Member

The /balls list command currently fetches the entire list of countryballs of a user, with all columns. This ends up taking a lot of time for users with insane amounts of countryballs.

This could be done my modifying CountryballsSource, currently inheriting from the source menus.ListPageSource, to inherit from menus.AsyncIteratorPageSource instead, specifically for lazy fetching of resources.

Reminder that this iterator relies on discord-ext-menus (vendored for interactions/typing), examples on how to implement these subclasses can be found here. Most of the code shouldn't need to be changed.

@laggron42 laggron42 added enhancement New feature or request package:players Package with /player commands labels Apr 20, 2023
@laggron42
Copy link
Member Author

I'm lowering the priority on that one, after running some timing checks it turns out the cost is not that high.

It is still an improvement that would be good to have, just not urgent.

@laggron42
Copy link
Member Author

Bumping the priority now, we reached a point where it's needed.

@laggron42 laggron42 self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package:players Package with /player commands priority:high
Projects
None yet
Development

No branches or pull requests

1 participant