Soul Shards Respawn

Soul Shards Respawn

6M Downloads

Repeated calls to Binding.fromNBT causes small slowdown with UUID.fromString

noobanidus opened this issue ยท 0 comments

commented

I'm not actually entire sure what's causing the inventory to be consistently transmitted the number of times that it is, but I noticed when I was trying to track down the actual cause of lag on my server that UUID.fromString was taking up a large percentage of the tick time.

It seemed to be that the deserialization from NBT for the Soul Shards uses strings to store them.

It's probably a non-issue as I don't know that it would be called this frequently under normal circumstances (I think another mod may be repeatedly transmitting the inventory) but I've recently switched to storing UUIDs as most/least significant longs as a compound tag in my own projects. I don't know if that's a superior method or if it would even help, but here's the info: