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

Added Previous Rank in the table #153

Merged
merged 6 commits into from
Jul 23, 2023

Conversation

elymination
Copy link
Contributor

Added Previous Rank in the table, alongside its table flag (False by default).

content::get_previous_season_id has been created to fetch the previous season id.

@elymination
Copy link
Contributor Author

#152

@elymination elymination mentioned this pull request Jul 1, 2023
@elymination elymination changed the title Table previous rank Added Previous Rank in the table Jul 1, 2023
@elymination
Copy link
Contributor Author

I just profiled Rank.get_rank and it is far for being free. my changes adds a call to this function and effectively doubles the cost of initializating the players (from ~0.4s to ~0.8s while solo in menus).

do not merge yet, I will try to add some caching for the Requests.fetch calls in class Rank.

@elymination
Copy link
Contributor Author

ebe1b62 takes care of adding the Requests.fetch cache, which is per puuid and gets invalidated when going from any state to menus.

while I added this to avoid doubling the cost of initialization because of an additionnal Rank.get_rank call, this will also speed up the initialization from menu to pregame if in a party (party members already cached from menus) and from pregame to game (team members already cached from pregame).

src/rank.py Outdated
return response

def invalidate_cached_responses(self):
print(f"Invalidating cached reponses")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotta remove this debug print statement

Copy link
Owner

@zayKenyon zayKenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for closing these two long-standing issues!

@zayKenyon zayKenyon merged commit 284d2b8 into zayKenyon:main Jul 23, 2023
@zayKenyon zayKenyon added this to the 2.6 milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Previous Rank Column RR lost or gained in last three competitive games
2 participants