The Twilight Forest

The Twilight Forest

140M Downloads

Spark profiler shows Twilight Forest using 3x CPU vs next heaviest

katubug opened this issue ยท 2 comments

commented

Forge Version

43.2.8

Twilight Forest Version

4.2.1518

Client Log

https://gist.github.com/katubug/d42346f89344c510d601ba218e557dae

Crash Report (if applicable)

No response

Steps to Reproduce

  1. Open new singleplayer world in Cottage Witch modpack 1.14.0a (technically mine is slightly modified as it's the update I'm working on)
  2. Make a pit with a bunch of zombies. I did 461.
  3. Run a spark profiler
  4. Observe unusual memory use

What You Expected

I am playing in a freshly made singleplayer world testing lag issues for my modpack. I have never been to the Twilight Forest in this world. Therefore, I expect that a dimension that I'm not in - which has not been generated - would be consuming significant resource per tick.

What Happened Instead

Here is a link to (a screenshot of) the Spark profile (taken over 5 minutes), showing an unusual amount of resource usage attributed to "twilightforest.events.__CapabilityEvents_updateCaps_LivingTickEvent.invoke" and so on:
https://i.imgur.com/zyyMq6a.png

I actually didn't notice it right away, but had it pointed out by a user that it was using significantly more resources than the next most consumptive mod. They mentioned it was trying to tick capabilities every tick or so, and figured it would be worth putting in an issue so that this can be throttled.

Additional Details

Link to modpack file: https://www.curseforge.com/minecraft/modpacks/cottage-witch/files/4499871

Please Read and Confirm The Following

  • I have confirmed this bug can be replicated without the use of Optifine.
  • I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
  • I have confirmed this issue is unique and has not been reported already.
commented

Can confirm the above.

commented

Hey there, ive pushed out an update that will hopefully address this issue a bit. Even though spawning 400+ mobs in a space and expecting them to perform well is a lost cause even in vanilla I tried to reduce our footprint a little bit regardless. I need to tick certain caps for every entity but I did my best to weed out the ones that were unnecessary for every entity and moved them to player only instead.
It is worth noting though that 1.19.2 is no longer supported and hasnt been for a while now, so this change will only go into effect in 1.19.4+. If anyone is interesting in testing this out feel free to grab this build and let me know how it functions. Thanks!