Origins (Forge)

Origins (Forge)

7M Downloads

EXTREME TPS LAG

archynoid opened this issue ยท 11 comments

commented

I've been going around trying to get to the bottom of the TPS lag that is occuring on a server I am running. This is the third and final place that I've come to and considering I can't even find a discord for the forge port makes all this so much harder as the origins fabric discord doesn't provide support for forge. TPS spikes hard as more and more people join and it doesn't recover unless people leave. For some reason origins is executing a massive amount of recipe/inventory related commands and I have 0 idea as to why. It is currently taking up 50% of the entire server thread by itself and its ridiculous. I have a few screenshots of what is happening, do you have any idea what this might be?

Server Thread pic 1
Server Thread pic 2
Additional Entity Attributes (origins forge only view) image 1
Additional Entity Attributes (origins forge only view) image 2

commented
  1. There is no discord for forge as community management is absolutely not one of the skills I have.
  2. Origins doesn't run the clear command, at least not with default origins, that's a datapack oversight.
  3. The way recipe lookup is implemented is bad, as in doubles recipe lookup time bad. I'll try to not lookup recipes if the player doesn't have one of these powers, but that has a cost too.
commented

I have no origins datapacks on the server i am running and additionalentityattributes is also using a large portion of my server

image

commented

That's not aea, if you look at the package name, it's mostly apoli.

commented

If you can, I'd be interested in the stacktrace for IPowerContainer.hasPower. There might be some things that can be done there also.

commented

@EdwinMindcraft how can I go about getting that for you?

commented

Same thing you did for your first picture (Server Thread pic 1), just expand the tree as much as possible.

commented

I can't find it in all view
image
Right now TPS is fine so I cant run a profile

commented

Don't worry, what you've given me is basically what I wanted. I think I have an idea to make it run faster, at the cost of a bit of memory.

commented

Alright, thank you!

commented

Has this been worked on?

I am experiencing TPS lag, and by using Spark I found out it was mostly Apoli with MineColonies' citizens.
It was checking all the items in those citizens, making copies of each item along side with their capabilities, which apparently uses a lot of tick time. (EntityLinkedItemStack)
Beside checking items in living entities, it is also using a notable amount of tick time checking PhasingPower and ClimbingPower for living entities. (GlobalPower)

Is it possible to add a switch to disable all those parts if no registered power uses those (EntityLinkedItemStack and GlobalPower)?

commented

Has this been worked on?

I am experiencing TPS lag, and by using Spark I found out it was mostly Apoli with MineColonies' citizens.
It was checking all the items in those citizens, making copies of each item along side with their capabilities, which apparently uses a lot of tick time. (EntityLinkedItemStack)
Beside checking items in living entities, it is also using a notable amount of tick time checking PhasingPower and ClimbingPower for living entities. (GlobalPower)

Is it possible to add a switch to disable all those parts if no registered power uses those (EntityLinkedItemStack and GlobalPower)?

Your issue is different this one.

And I do have plans to optimise EntityLinkedItemStack next update, it wasn't really a good point in Origins Fabric until recently.