Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Performance improvements and code organization changes#45

Open
mibac138 wants to merge 7 commits into
SnowShock35:mainfrom
mibac138:main
Open

Performance improvements and code organization changes#45
mibac138 wants to merge 7 commits into
SnowShock35:mainfrom
mibac138:main

Conversation

@mibac138

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant