You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2018. It is now read-only.
I know that right now one can pass "EnumSet.noneOf(TickType.class);" or "null" for the overridden tick()-method. But this does not seem like a neat solution.
To optimize performance it should be possible to cleanup a tick handler that is not needed anymore: TickRegistry.unregister(ITickHandler)
This comes into use when mods provide an interface to be disabled or deactivated at runtime.
But there might also be occasions where TickHandlers are logically bound to ingame objects. When the Object is gone the Handler should too.
Right now there will still be an artifact handler instance which will just return null on tick(). But this means unnecessary memory usage and method calls, and statement evaluations (esp. in the for-loop at FMLCommonHandler.java:114 with unnecessary calls at lines 116, 117, 118)
Thanks for considering.
The text was updated successfully, but these errors were encountered:
As this is only an enhancement request and not a PR I have no test data.
But being able to clean up objects which eat up ram and cause extra code execution simply sounded like a good idea to me.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I know that right now one can pass "EnumSet.noneOf(TickType.class);" or "null" for the overridden tick()-method. But this does not seem like a neat solution.
To optimize performance it should be possible to cleanup a tick handler that is not needed anymore: TickRegistry.unregister(ITickHandler)
This comes into use when mods provide an interface to be disabled or deactivated at runtime.
But there might also be occasions where TickHandlers are logically bound to ingame objects. When the Object is gone the Handler should too.
Right now there will still be an artifact handler instance which will just return null on tick(). But this means unnecessary memory usage and method calls, and statement evaluations (esp. in the for-loop at FMLCommonHandler.java:114 with unnecessary calls at lines 116, 117, 118)
Thanks for considering.
The text was updated successfully, but these errors were encountered: