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

Performance improvements and code organization changes #45

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mibac138
Copy link

Reduces world-loading time on an ATM9 mod pack by ~300ms.

Creating a DecimalFormat, while rather cheap, is not free, and it's
wasteful to recreate it everytime, sometimes without even using it at
all. Because DecimalFormat isn't thread-safe, just create one instance
per thread.
Improves type-safety and simplifies reasoning about code
This also allows to skip processing a handler if it's not enabled
(previously the handler would needlessly run even if it was disabled)
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