According to Spark, AA is consuming huge amounts of processing time
pm065 opened this issue ยท 6 comments
Describe the bug
I ran a Spark profiler when I noticed my game was running suspiciously slow. The TPS was consistently dropping down and mobs were sometimes moving in a stuttery way. This is the result:
https://spark.lucko.me/EdmXfBLyrP
What surprised me:
https://gyazo.com/442649dbde5ff2ecd8135b9ec14937e1
If I'm reading this right, Antique Atlas is taking up 70% of the processing time.
To Reproduce
- Install Spark and AA in a forge instance
- Go onto a world
- Spawn in some animals, notice the occasionally strange behaviour (stuttering, etc)
- Run a Spark profiler (/spark profiler)
- Wait for a bit, fly around
- Stop the Spark profiler (/spark profiler --stop)
- Open the link
- Click the process that's taking the most resources until you can't go any further
- Look at the processes mentioning AA
Expected behaviour
A clear and concise description of what you expected to happen.
Forge version information:
- Minecraft: 1.16.5
- Forge: 36.1.32
- AntiqueAtlas: 5.4.4-forge
Been using this mod in my Better Minecraft Modpack since the beginning and removed it in latest update due to how bad tps gets with it and removing the mod has fixed all tps issues so I have to agree pm065 that there is something wrong with the mod and tps.
With the amount of information given on this issue, I cannot do anything. Whenever you report performance issues, at least provide your system information! It's a major difference, if you have performance issues on a 15-year-old laptop or a brand new high-end gaming pc.
Also, as I'm suspecting at least a mod interaction problem, or even another mod, I need the modlist and versions.
Ill make a more informed Issue when I have the time but as it stands this happens on any Server Hosting sites like Bisect Hosting or on my PC for SP & MP which is a I9-9900K and RTX 2080 Super, 16 GB Ram 3200mhz, SSD. This isn't just my PC this was for all my players using my Modpack. It caused me to remove it due to the tps issues.
Well, I had a look at the linked mod pack with added AA and indeed, the performance is abysmal. I tried to gather some information on what's going on, and added a bunch of profiling information to AA, but some other mod in your mod pack fucks the built-in profiler. So there's that.
I still think there's a mod in your pack, that simply takes its time with world gen. Because in the attached build, I changed the way, AA requests chunks for cartography. It tells Minecraft to give it the chunk in any generation state available instead of the fully generated state. Hence, the waiting time for the chunk is low, but the downside to that is that the first scan won't be accurate. With that, I get very usable tick times.
Well, performance is quite a complex topic.
From what I'm seeing so far, I don't expect AA to be the actual culprit. While it looks like AA consumes a huge amount of processing time, it actually does not. When you dig down deeper into what takes the time, you can see, that all time is spent in World.getChunk()
and deep down ends in LockSupport.parkNanos()
. That basically means, AA is actively waiting for some other thread finishing so it can get the chunk it's trying to map.
I have nothing to point at, but I suspect that AA is simply waiting for world gen to be finished. Maybe your system is just slow, or some other mod blocks world gen somehow, or there is a chain reaction there newly generated chunks cause other chunks to be generated.
While I don't think AA is causing the issue, try disabling it and run Spark again.