JavidPack / BossChecklist

Mod for tModLoader to help with Boss Progression
https://forums.terraria.org/index.php?threads/boss-checklist-in-game-progression-checklist.50668/
61 stars 23 forks source link

Horrible performance (>=70% of total CPU time spent in BossChecklist when joining a server) #99

Closed crwn1337 closed 10 months ago

crwn1337 commented 1 year ago

The game becomes absolutely unplayable with this mod.

The call tree seems to indicate that the massive performance loss possibly comes from these lines:

image

Steps:

  1. Launch a cli server
  2. Join the server from the client
  3. Experience massive lag for ~5 minutes, which stops for a minute or 2, but comes back every time

Modpack: enabled.txt

JavidPack commented 1 year ago

Looks like at least one of the mods you have enabled has a massive bug and is sending the world data packet every tick. Can you do some testing by disabling sets of mods and identify that mod? We have been made aware of similar issues in the past and have had the mods causing the issue fixed, this is likely a similar situation.

We can make our method more efficient, but if a mod is sending world data packets often like that, the experience for other players will already be massively hampered.

crwn1337 commented 1 year ago

Luckily it only took me 30 minutes to find the mod that causes this, it does mention that multiplayer is currently broken, which is unfortunate as it seems like a cool mod.

JavidPack commented 1 year ago

Thanks for letting us know, that'll help us in the future.

crwn1337 commented 1 year ago

I took another look at this again and for some reason now it doesn't cause a performance hit?? I've changed absolutely nothing and relaunched terraria 5 times at this point, tried creating a new world, a new character and even completely wiping my entire tmodloader folder and using the modpack in the original post. I don't know if this is a problem with the mod I mentioned or if it really is an issue with BossChecklist.

Curiously, I tried adding the Calamity infernum mod, since I've heard it causes the issues that I mentioned and now it causes massive lag again? I don't get it.

After restarting my PC, the issue came back and I can now confirm that it indeed is an issue with Mod of Redemption.

SheepishShepherd commented 1 year ago

The commit above should help somewhat. When world data packets are sent and received, they will only refresh the Table of Contents page if the Log is opened. This should at the very least help with frame drops during game play, but they issue will persist when interacting with the Boss Log's checklist.

Edit: To note, this commit actually should be implemented since the page is refreshed when opening the log anyways. There is no need to refresh the page if the Boss Log is closed.

SheepishShepherd commented 10 months ago

Recent commits might also help to improve frame rate drops. Reopen if issue persists.