8000 Optimize scoreboard & allow ratelimit by Pablete1234 · Pull Request #1060 · PGMDev/PGM · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Optimize scoreboard & allow ratelimit #1060

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

Merged
merged 1 commit into from
Sep 24, 2022
Merged

Optimize scoreboard & allow ratelimit #1060

merged 1 commit into from
Sep 24, 2022

Conversation

Pablete1234
Copy link
Member

Allows scoreboard being rate-limiting under stress situations, in a similar fashion to tablist, where if the renders take long or if the server runs low on TPS it will debounce for longer periods (up to 1 second). This reuses logic originally used in tablist to debounce (in that case, up to 5s), which has now been put in a RateLimiter util, and reused in both places.

The reason for this change is that specifically for ffa, where sidebar renders player names, it can take a non-trivial amount of text serialization/deserialization, which can be costly. Additionally, names have been changed to use the simpler just-color version of the name, which should be faster than the full version with flairs and hover events etc.

Signed-off-by: Pablete1234 <pabloherrerapalacio@gmail.com>
Copy link
Member
@Electroid Electroid left a comment

Choose a reason for hiding this comment

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

Nice refactor, looks good.

@Electroid Electroid merged commit f1a3cac into dev Sep 24, 2022
@Electroid Electroid deleted the sidebar-optimizations branch September 24, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0