Page 1 of 1

[0.17.4] Blueprints/decons lag multiplayer game

Posted: Fri Mar 01, 2019 11:11 pm
by Discookie
Me and my friends have been placing lots of blueprints (for fun), and then deconstructing them, over and over. Rails and chests mainly.

After a while, the (headless) server started hogging huge amounts of CPU, and our clients also lagged quite a bit.

Logs don't show anything, but usage statistics show that 'CRC' is eating about 12ms of the frame time client-side on a Ryzen 2600, and more for my friends.

https://imgur.com/Dg2cs4f

Re: [0.17.4] Blueprints/decons lag multiplayer game

Posted: Fri Mar 01, 2019 11:16 pm
by Discookie
After a bit of research, it looks like it is only lagging whenever I am logged in onto the server.
From another's player POV:
https://imgur.com/a/ZVB1lN1

It doesn't lag if I'm not logged in, and it doesn't lag when any of us plays the map in singleplayer.

Re: [0.17.4] Blueprints/decons lag multiplayer game

Posted: Mon Mar 04, 2019 7:35 pm
by Discookie
After a bit more research, it looks like it's directly related to undo history size.

Reproduction steps:
  1. Start or join a multiplayer server. (Headless and local both work.)
  2. Start placing lots of rail ghosts on top of each other, easiest to do by shift-clicking rails on roughly the same spot. (Belt or wall ghosts also work.)
  3. Deconstruct all of them at once.
  4. Notice how the CRC jumps by 0.1-1.5 ms depending on the blueprint density.
  5. Rinse and repeat until you cannot play anymore.
This has quite a bit of griefing potential, since apparently the undo history is processed by every player on the server, thus slowing down the game for everyone with little effort and no placed items.

Undo seems to clear the lag somewhat, but I still have no real way to 'clear' it, since I've built quite a few objects while lagging horribly.
A possible solution would be an option to clear the Undo history, assuming that's the problem.
Until then, I have a save that I can only play locally, or under a different username.

Re: [0.17.4] Blueprints/decons lag multiplayer game

Posted: Tue Mar 05, 2019 9:15 am
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.