Applied Energistics 2

Applied Energistics 2

156M Downloads

Performance issues when using (wireless) ME terminals heavily

Nivid-IT opened this issue ยท 1 comments

commented

How to reproduce the performance issue

After running dozens of Observable reports and Spark profilers over a timespan of two weeks, I've noticed different events under "appeng" cause considerable strain on server performance. Once enough players do this consistently, timeouts even start occurring. Reports below have been reproduced consistently:

Observable report with players not opening ME wireless terminals as well as regular crafting terminals for a full minute:
image

Observable report with at least one player keeping an ME wireless terminal as well as regular crafting terminals open for a full minute:
image

Screenshot of a Spark report for which I no longer have the link (it is not the same as the one linked below)
image

Spark profile link

https://spark.lucko.me/Ujkq42QxgV

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Forge

Additional details

No response

commented

I have seen vague reports of something like this quite a few times, you are the first to actually provide a spark profile of it.

It is quite unfortunate that you lost the other link, because I that one seems more interesting to me (I haven't seen menu opening take that much time, and there is likely going on something weird (unless someone was spamming the hotkey to open and close the terminal, in which case this wouldn't surprise me as much))

But the other profile shows pretty well where the tick time you see in observable comes from:
the biggest time is spent in appeng.menu.me.common.MEStorageMenu.broadcastChanges(), while getting all items in the ME Network, to tell the client what items the network contains.
This is normal, and is the same for the non-wireless terminals, except that the time spent there gets attributed to the ME system ticking and not the player ticking like it does with the wireless terminals.

Tho that doesn't mean that that there isn't anything that can be done about this, but I don't have enough knowledge on the internals to be able to say anything about this.