Mekanism Additions

Mekanism Additions

21M Downloads

Lag from factories caused by misplacing item

SubjectHawk66 opened this issue · 7 comments

commented

Issue description:

Putting an item in a slot (idk what the slot is or does so I'll put a picture) makes a factory lag a lot.

Steps to reproduce:

  1. On the right of the factory there is a slot with the background "I" if you put an item like an iron ingot, it causes a lot of lag
  2. If you do a profile it will be causing like 2000 or so microseconds/tick of lag

Version (make sure you are on the latest version before reporting):

Forge: 14.23.5.2844
Mekanism: 9.8.0.381
Other relevant version:

2019-11-08_12 57 08
2019-11-08_12 56 31

commented

Heads up: this is not a post saying we won't look into it.

2000 microseconds = 2ms
So, the time it takes to determine if whatever is in the slot can do whatever the action is supposed to be (I'm not sure off the top of my head what that is).

I'm also fairly certain the only way you can measure microseconds is with wall-clock time, which is not great for performance measuring because it doesn't take into account if your OS decides to stop executing Java in order to run something else.

commented

Well it was more of a visual representation of how much lag it causes. To better describe the amount of lag, it makes the entire server shutter every so often and it also lags a lot more when it's smelting stuff. Also what does that slot even do? Why would just any item be allowed in it?

commented

I mean I agree that it shouldn't accept items that are not valid there, but if it causes so much lag just remove the item instead of leaving it in there? (Though yes thank you for the report as it is helpful for us to know about these things). And I think the slot is for changing what type of factory the block is, though I have never personally used it, so am not quite sure how it works.

commented

Well actually it went in there because I shift clicked and didn’t realize it was the thing causing the lag until I saw it in there. That’s a bigger issue definitely. So basically the factory was full of clay and I accidentally shift clicked an iron ingot in there (this hasn’t ever happened before though) and I think that’s what happened.

commented

I'm skeptical that it's the sole source of lag, it's only 4% of an ideal tick

commented

Well as I said it’s causing the server to shudder every so often. It mostly adds on to the lag from frogs and beehives both of which are 1500 microseconds. I can post a full profile with that on but I’m mostly just saying that it’s laggy and Iron shouldn’t be allowed in there if it just causes lag.

commented

Should be fixed in 9.8.3.390