-
Notifications
You must be signed in to change notification settings - Fork 278
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
NTM Optimization Update! #1733
base: master
Are you sure you want to change the base?
NTM Optimization Update! #1733
Conversation
RBMK optimization update soon!!!!!!!
i finally fixed the bug!!!!!!!!!!
just some more optimization! (node culling)
# Conflicts: # src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKRod.java
RBMK optimization update soon!!!!!!!
i finally fixed the bug!!!!!!!!!!
just some more optimization! (node culling)
chat is this real |
(it was slow and needed a redo)
# Conflicts: # src/main/java/com/hbm/tileentity/network/TileEntityCraneGrabber.java
Do you have any profiler data on the upgrade stuff? Because I'm not sure if caching that would even change a whole lot, considering often times machines run without upgrades anyway and machines only have 2-4 upgrade slots at most. |
would it be possible to process rbmks that can't interact with each other in seperate threads for more speed? or did you already implement that? |
Multi threading RBMKs is possible, though it would have such a massive overhead for synchronizing them that it would be slower than with what we have right now. |
The main reason I even touched upgrades at all was because 70000hp mentioned that he noticed some speed issues when using that system since it checks every tick every upgrade slot, though I haven't seen any performance impacts of my own. |
Upgrade checks are just for loops the size of the upgrade slot range (single digit) which either NOPs when no upgrades are installed or adding upgrade info to a hashmap (with at most as many elements as there are occupied slots), whatever the machine itself does (recipe lookup, port connections, etc) is likely magnitudes more impactful than that, which is why I'd prefer seeing profiler results first before changing anything with the upgrade system. |
Alright, I'll try and see if I can get some profiler data on it this afternoon, as well as maybe looking into how to optimize other parts of machines. |
# Conflicts: # src/main/java/com/hbm/main/ModEventHandlerRenderer.java
# Conflicts: # src/main/java/com/hbm/main/ModEventHandlerRenderer.java # src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java
…mprovements such as removing debug fluid net code and making RBMKDials more accepting of new gamerules.
# Conflicts: # src/main/java/com/hbm/extprop/HbmLivingProps.java # src/main/java/com/hbm/handler/EntityEffectHandler.java
…or be to explain them all
With this most recent commit, the 100 rod RBMK time has been reduced to a mere 0.818 MSPT avg, as well as the memory usage being reduced by almost double due to optimizations with how the |
also holy shit the whitespace changes, intelliJ wanted to optimize the imports and refactored a ton of whitespace in the process.
# Conflicts: # src/main/java/com/hbm/main/ResourceManager.java
This has since been improved to ~0.616 MSPT med, as well as memory usage being reduced from ~800MB before any optimizations and ~2100MB after MSPT optimizations, down to ~300MB (All tested on the 100 rod RBMK save). |
- Pooled buffers removed due to issues with releasing the memory. - ExtProps fixed for players/entities; improper deserialization.
The NTM Optimization Update is here!
Changes:
Completely removed the
NBTPacket
andINBTPacketReceiver
classes in favor of usingByteBuf
s for everything.Reworked RBMK and Chicago Pile neutron calculations, now they should be way more performant (and use the same system).
Tons of other small tweaks.
Profiler results:
100 Rod RBMK (made by nootles):
Before: 22.9 avg MSPT
After: 2.58 avg MSPT
Gerver (my personal server):
Before: 12.9 avg MSPT
After: 5.32 avg MSPT
Don't merge yet, still looking for a good place to check for every possible issue that could exist.
(sorry about the crazy commit structure, GitHub was being an asshole and wouldn't let me resolve conflicts)