Immersive Engineering

Immersive Engineering

134M Downloads

[1.12.2] Thermoelectric gens performance review requested - taking too many ticks.

ProsperCraft opened this issue ยท 6 comments

commented

Description of the issue:

Thermoelectric gens were taking 70% of our entire server tick, after removing 50 or so, they are still taking too much of the performance.

Versions & Modlist

Modlist here - https://minecraft.curseforge.com/projects/towncraft

Find attached sampler file for viewing in visualvm
Thermoelectricgens.zip

Find attached warmroast-
thermoelectric.zip

Lagoggles-
2018-04-08_10 35 40
2018-04-08_10 35 30

commented

Did you notice an improvement in performance as you were removing them? Asking out of interest.

@malte0811 easiest way to fix this would probably have them check their temperature gradients on block update, right? Only check them when the world around changes? Sound sensible?

commented

oddly, it seemed that the server had to be rebooted to recover the performance.

commented

That seems to at least give a bit of premise to the idea that it's not IE's thermoelectrics that are causing your performance issues...

commented

@BluSunrize
visualvm
Checking on block updates would fix this, the root cause is quite interesting though: About 90% of the time taken by the thermoelectrics are spent creating 2 itemstacks (due to capability initialization events). We can probably work around some of it (the call to copyStackWithAmount can probably be removed in some way), but this is mostly a forge problem, made worse by "timings" using 2 event handlers for capability initialization.
Also, you still haven't replied to the second paragraph of #2929 (comment).

commented

I told you yesterday that I deleted my comment because I didn't know either.

commented

Where do we stand on fixing this lag source?
image
That's on FTB Revelation 1.8.0 including ImmersiveEngineering-0.12-80.jar