MehVahdJukaar / mapatlases-neoforge

GNU General Public License v3.0
21 stars 5 forks source link

[Forge 1.19.2 5.6.6] Significant Lag Spike while loading chunks with atlas in inventory #71

Open thelegitdolt opened 6 months ago

thelegitdolt commented 6 months ago

When traveling with an atlas, it can take very very long for new chunks to load (like about 10 seconds per chunk forward). Chunks will load eventually, just takes really damn long

https://gist.github.com/thelegitdolt/28d3ecf665cb11d40ddfba4ed1aeb6d8

thelegitdolt commented 6 months ago

please feel free to ask for more information. I love this mod and would really like to get it working

MehVahdJukaar commented 6 months ago

Can you get a spark report? Can you confirm this does not happen with normal maps? Also do you have supplementaries installed?

thelegitdolt commented 6 months ago

I do have supplementaries installed. i'll do the other two things

thelegitdolt commented 6 months ago

I can confirm that normal maps takes much faster to fill than atlases. I can't reproduce the massive lag spike in a new world, though, but normal maps takes wayyy faster

Also, how do i get a spark report? I have spark installed and there's nothing obvious

thelegitdolt commented 6 months ago

https://spark.lucko.me/GCvhO9Ucvs uhhhh... is this it

thelegitdolt commented 6 months ago

I maanged to reproduce the lag spike, https://spark.lucko.me/97elAwscUU

MehVahdJukaar commented 6 months ago

I'm not sure what's going on. Try turning off multithreaded update. Also can you replicate this in 1.20?

MehVahdJukaar commented 6 months ago

As for the spark report I would need the server thread one not the client thread one

thelegitdolt commented 6 months ago

how would i turn off multithreaded update?

MehVahdJukaar commented 6 months ago

In the confis

thelegitdolt commented 6 months ago

https://spark.lucko.me/IcW8GrdK3z i think this is the server one?

thelegitdolt commented 6 months ago

and turning off the multithreading thing didn't help

MehVahdJukaar commented 6 months ago

So I see it comes from vanilla code. I was aware of an issue but I thought I optimized it. Not sure if that patch was in 1.19 so could you test in 1.20 pls? Also are you sure this doesn't happen with a vanilla map? Especially a map with a high scale

thelegitdolt commented 6 months ago

Can't reproduce in 1.20. Not sure how I would test with a vanilla map though

MehVahdJukaar commented 6 months ago

ok so try new mod version. weird that 1.20 didnt have, it thought i had a fix there but aparently it had the same code

BookerCatch commented 6 months ago

I was experiencing a similar issue with just the atlas, and not the vanilla map. The atlas minimap had to be on screen for the lag spike to occur. For me, it manifested as an increased variability in the frame time, noticeable with the ALT+F3 frame graph. I'll double check and test again and get back with more concrete findings.