gkbm2013 / tinker-IO

Tinker I/O - An addon for Tinkers' Construct!
https://tio.gkbsite.org/
GNU General Public License v3.0
13 stars 8 forks source link

Smart Output Lag #50

Closed cjm721 closed 6 years ago

cjm721 commented 7 years ago

Been trying to fix some lag on my server and one of the major causes is tinker_io.TileEntity.SOTileEntity

It appears to be because of the cost of the registry lookups in base TC but that would suggest that TC's tables should be doing the same thing but they don't take nearly as much.

image

gkbm2013 commented 7 years ago

Okay, I'll try to fix it. Thanks for report.

gkbm2013 commented 7 years ago

@cjm721 Could you tell me which software you are using to observe the performance of server? I want to test on my own computer. Thanks!

cjm721 commented 7 years ago

jvisualvm mostly. It is included with orcale JDK.

jinkhya commented 6 years ago

Hello, We've had the same kind of issue with the smart output causing lag on our server. After some testing, it occurs when there is some liquid in it but it can't do anything with it, like the equivalent of liquid of a few nuggets with an ingot cast for example. Version of Tinker I/O : tinker_io-1.12-release 2.5.6e.jar Forge : 1.12.2 14.23.1.2587 modpack : all the mods 3 (version 5.7b)

If you'd rather have me open another issue I can but it seems to be same problem as cjm721.

Jin

jinkhya commented 6 years ago

and It also lags a lot while being used actually.

gkbm2013 commented 6 years ago

@GemOfEvan 's code can solve the problem. I will use the code in 1.10.2 and 1.12 to fix this issue.

xorinzor commented 6 years ago

Having this same issue, profiled with Yourkit.

gkbm2013 commented 6 years ago

The problem have been solved in Tinker I/O release 2.6.0. Thanks for report!

ghost commented 6 years ago

hey @cjm721 sorry ah, can you explain what program do you use in that screenshot that shows lags in the issue pls? thanks

xorinzor commented 6 years ago

@kenijey it's a java profiler, it keeps track of how often and how long methods take to execute and can as such be used to detect bottlenecks in applications.

ghost commented 6 years ago

it seems very useful and wanna use it but don't know its name or anything it has.

jinkhya commented 6 years ago

Hello, after a few tests, I found one scenario when the Smart Output generates lag (uses about 30 % time tick) If you have some liquid in it but no cast, it ticks a lot.

Tinker I/O version : tinker_io-1.12.2-release 2.6.0a Forge : 14.23.2.2617 Mc version : 1.12.2 Modpack : All the mods 3