-
Notifications
You must be signed in to change notification settings - Fork 20
Add toggle for simplified hopper logic #322
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
base: master
Are you sure you want to change the base?
Conversation
spnda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you test the performance improvement exactly? I have wanted to rewrite the NBT handling for a while now to be a lot more performant, but just haven't found the time. Seeing as it's a quite big deal and multiple people have reported it I might just check it out soon (I have some free time now).
| public boolean isSimpleHopperProtection() { | ||
| return simpleHopperProtection; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you perhaps have any information on the performance of config.getX functions, given that I usually just call them instead of caching the variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config gets stored in memory when the load is called, so from there everything is memory only anyways - moving over to having the bool in a dedicated variable might be a bit of an improvement but certainly not by much
Let the server process the storage system for 10 minutes each and looked at spark afterwards, mainly looked at general mspt and percentage used by the plugin |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The default hopper logic can be incredibly performance heavy especially on servers with large amounts of hoppers (as seen by #306), so this PR implements a toggle for greatly simplified hopper handling, which simply prevents any hopper from pulling items from any protected chest.
In my tests this resulted in a 10-15% performance improvement with a medium sized storage system.