Darkhax-Minecraft / ItemStages

Allows items to be put into stages.
GNU Lesser General Public License v2.1
7 stars 18 forks source link

Improve performance with JEI #2

Closed mezz closed 6 years ago

mezz commented 6 years ago

Before: Finished JEI Sync, took 2197ms. 13769 hidden, 0 shown. after PR: Finished JEI Sync, took 377ms. 13769 hidden, 0 shown.

Unfortunately I did not have much time to test this change very thoroughly, but changes are small and the logic should be the same.

This does not fix https://github.com/Darkosto/SevTech-Ages/issues/202, but when both of these are fixed then things should run very smoothly!

Darkhax commented 6 years ago

These changes look fine, although I will need Darko to test them out before I can be certain. Thanks for the PR! I am hoping to reduce the amount of syncing required as well, although that might require some breaking API changes to game stages.

mezz commented 6 years ago

Right now you are doing many syncs all back to back, so I think the simplest solution for now would be to set a flag to true when you get a notification to sync, and then do the sync in the next tick.