Mekanism

Mekanism

111M Downloads

Unnecessary instantiation of Thread objects

BlayTheNinth opened this issue ยท 2 comments

commented

All of the packet handlers are instantiating new Threads, when all that is really needed here are Runnables.

See PacketConfigurationUpdate.java#L36 for example.

They are then just casted up to Runnables further down the line, so them being Threads in the first place is a waste in terms of memory allocation and performance (see Thread.java for the overhead that's happening for every packet at the moment).

commented

Submit a PR.

commented

Done!