NuclearCraft

NuclearCraft

31M Downloads

Small but notable lag with enabled Radiation

Krutoy242 opened this issue ยท 2 comments

commented

Overhauled, radiation_enabled=true.

I'm maintaining E2E-E server. I found that NC:O causing about 2% of TPS lag.

image

By looking through source code, i found that most heavy calls is loadedChunks.toArray and transferRadiationFromProviderToChunkBuffer.

  • How can I improve TPS on my server without completely disabling radiation? My radiation_world_chunks_per_tick set to 5, but seems like loadedChunks.toArray would constantly consume same amount of CPU, no matter of config.
  • How I could optimize transferRadiationFromProviderToChunkBuffer or make it not called at all? I cant find a config for disabling TEs to contribute chunk radiation.

Profile: spark.lucko.me/dgYOuB47ke

Logs: debug.zip

commented

Hmm, this seems like a tricky one to get around totally, but I have a potential idea to avoid the conversion of the collection of chunks into an array. I'll add it to the next version of NCO, but it might be a bit of time before NCO as a whole is stable again.

I can also add the config option you describe to disable TEs contributing to chunk radiation :)

commented

Sorted, hopefully it works!