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

[PORT] Implements icon size caching to avoid unnecessary load in updatehealth #4491

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Dec 7, 2024

About The Pull Request

Port of tgstation/tgstation#88266

Technically an improved port of DaedalusDock/daedalusdock#651, instead of only storing height over 32 pixels for HUDs we store both pure height and width for the sake of cutting down on icon operation spam (which is pretty costly). Should save us a significant amount of time, cuts down update_health_hud times by 45% and total update_health by 30% which is pretty good for a somewhat hot proc.

Why It's Good For The Game

Our health HUDs constantly fetch icons twice every update_health, jesus.

Changelog

🆑 Absolucy, SmArtKar, Kapu
code: Implemented caching for icon sizes which should significantly improve mob health performance due to HUDs constantly fetching icons.
/:cl:

@Absolucy Absolucy merged commit 3404e4f into Monkestation:master Dec 8, 2024
26 checks passed
@Absolucy Absolucy deleted the cachecache branch December 8, 2024 03:09
github-actions bot added a commit that referenced this pull request Dec 8, 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