Povstalec / StargateJourney

A repository for the Stargate Journey Minecraft Mod
39 stars 16 forks source link

DHD's Firing every tick causing lag on servers #92

Closed Burchard36 closed 3 months ago

Burchard36 commented 3 months ago

Hey there, there is another issue opened on this but unfortunately he didn't give you enough info on it ( #26 )

TL;DR: The DHD itself is laggy, as it appears to be doing some searching every tick, you can view its high tick usage here in observable, do note there is a bunch of other items in this observable profile, and the DHDs run almost as the same usage as thousands of mekanism structural blocks

Observable report: https://o.tas.sh/#NkvKW (Go to "Aggregate Results" tab)

Spark report: https://spark.lucko.me/UbBEP1lHmM

This is all only from about 1-2 DHD's (Used crash utilities to search for them, and not many are placed), it would be more understandable if someone has a large stargate network but this has been going on for a few months now, I've just been slow to bring an issue to it

The issue can likely be fixed by just doing checks every other few ticks or even every other second, though not sure what the codebase is like so I'll leave that up for any contributors :p

You can replicate this issue, by simply placing the DHD and watch it run about 1000us in observable, just a few of these places runs about the same stress as one of the laggiest bases on our server

lukaskabc commented 3 months ago

Hey there, there is another issue opened on this but unfortunately he didn't give you enough info on it ( #26 )

TL;DR: The DHD itself is laggy, as it appears to be doing some searching every tick, you can view its high tick usage here in observable, do note there is a bunch of other items in this observable profile, and the DHDs run almost as the same usage as thousands of mekanism structural blocks

Observable report: https://o.tas.sh/#NkvKW (Go to "Aggregate Results" tab)

Spark report: https://spark.lucko.me/UbBEP1lHmM

This is all only from about 1-2 DHD's (Used crash utilities to search for them, and not many are placed), it would be more understandable if someone has a large stargate network but this has been going on for a few months now, I've just been slow to bring an issue to it

The issue can likely be fixed by just doing checks every other few ticks or even every other second, though not sure what the codebase is like so I'll leave that up for any contributors :p

You can replicate this issue, by simply placing the DHD and watch it run about 1000us in observable, just a few of these places runs about the same stress as one of the laggiest bases on our server

DHD's were rewritten in 0.6.21, please update to latest mod version