Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

Long-distance belts leading to mass lag spike upon rendering; item buildup @ unloaded points

Shibva opened this issue ยท 6 comments

commented

Describe the bug

I'm not sure if I'll be able to relay the bug in its entirety properly; Regardless, I will give it a shot.

Context: I was transporting many items across a long conveyor belt line that most likely led to outside-of-player render distance. Upon approaching more of the line to check how it's going I find my game is not responding. I wait it out and eventually it starts responding again, but now is producing a substantial FPS drop whenever I'm looking at the front of the belt line.

my guess is that because the belt was going into an unloaded chunk, it was building up. but built up to the point where it was way more item entities rendering than what would be expected, as a result causing a massive in FPS only when I look at it (this may be some render thing doing this acting as an entity render culling when I'm not looking at them)

To Reproduce this issue:

  1. Set up a laser miner maxed out with tier III range and power upgrades (2 of which are overclock MK III) and a line pumping out the items (ejectors and stack ejector upgrades maxed out) and have the belt run along a long distance (whether being outside of loaded chunks or just by entering "lazy" chunks is unknown, the former would be preferred just in case), Chunkloading may prevent the bug from occurring so avoid having the belts going into what would be unloaded chunks for the player stay loaded via other means

  2. Have the miner run for a bit (preferably until half of its work area is excavated); it's important that you say at this location and not investigate it before this interval (to ensure that it's reproducible)

  3. once it's halfway done, investigate the belt to the end; At this point, there's a high chance that you will find the integrated server "freezing" (or in better words, struggling to keep up) the bug can be seen at this point

  4. if you wait long enough, the server will catch up and you will be able to interact with the integrated server again; yet experience a substantial frame-drop

Edit 3: note to self; ensure that Grammarly is not fudging up corrections

commented

What's RoR (sorry for necroposting)?

commented

Most item transport mods don't cause issues with unloaded chunks because things like item ducts know where the item will go before the item even leaves the machine, while conveyor belts just move items without caring where it ends up. The only real solution I can think of that doesn't involve chunkloading would be a "neighboring chunk unloaded"-detector that would let people turn off their ejectors when a nearby chunk is no longer loaded.

As for improving performance, one idea that I had would be a "box packer" that would combine several stacks into a single conveyor entity. That way you'd effectively reduce the amount of entities as well as reducing render complexity (since a box is just a cube compared to hundreds of polygons of a fully modeled gun for example).

commented

Additional Note: the reason why this doesn't happen when im not looking at it is mostly due to the other mods that I have in it; two of which are Reika's (Chromaticraft and his Coremod DragonAPI) that has some sort of culling for performance sake

I felt that I should make note of this; without any sort of culling the FPS-lag will most likely occur even if your not looking at it

commented

some screenshots on this

not looking at it and not laggin (as explained above)
2022-07-23_18 37 21

when looking at it
2022-07-23_18 37 25

the moment it reached the inserter
image

commented

2022-08-11_20 13 23

pack'd

commented

Boxing large volumes of items is a thing now and unloaded chunks can be detected by using RoR transmitters set to polling mode, which will cease transmission when unloaded.