[Enhancement] Server startup improvements
sscards55 opened this issue · 3 comments
So when Forge starts up a server, it remaps all the block/item IDs in that world. For some reason that means it goes through all of the tooltips. You have a tooltip event subscriber that queries the oreDictionary entries of that item. This unfortunately means CPU cycles used for an ultimately pointless task and memory allotment for objects that exist only to be garbage collected.
Steps to improve
Only useful for loading multiple worlds per Minecraft start.
↓
- Create event handlers for server started and server stopping/stopped events.
- Register/unregister tooltip event handler reducing world/server loading times.
- ...
- Profit
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 problem with that is it breaks tooltip searching in JEI. Not sure how many people use that, but it's not a feature I would want to give up. I did find a small optimization for the method is question, shaves about 1.8 seconds off launch time on my system.