Reika_Mods_Issues
Reika_Mods_Issues copied to clipboard
[DragonAPI] Excessive time spent by IWG.DungeonGenerator on FindFirstFile() during server tick
Profiling a world in an already generated area shows ChromatiCraft.World.IWG.DungeonGenerator.isGennableChunk() taking up over 40% of tick time. Following the stacktrace it leads down to WindowsNativeDispatcher.FindFirstFile0() 2 times, once from DungeonGenerator.updateNoisemaps() and once from DungeonGenerator.getNearbyZones(). While the profiler was running I did not move (only turned my head) so no new chunks should have been generated in that time. It should also be noted that in this scenario the profiler only recorded ticks that took at least 150% longer than normal tick duration, so (leading to) in this case lagspikes, not constant slowdown.
[Part 1 from profiler results]
[Part 2 from profiler results]
This also seems to be appearing during normal generation, a profiler result from that: https://spark.lucko.me/XjBUJoF7Pj
I added some caching that should help.
Apparently this is still affecting people.