Stormwind99 / FoodFunk

Minecraft mod: What is that funky smell in my backpack? Food spoils over time unless preserved. Configure any item to rot, any container to preserve items.
https://minecraft.curseforge.com/projects/food-funk
GNU Lesser General Public License v3.0
10 stars 8 forks source link

Too many onClientTick listeners? #78

Open big-099117109 opened 3 years ago

big-099117109 commented 3 years ago

Many instances of com.wumple.foodfunk.capability.preserving.Preserving.onClientTick(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)

im like 99% sure its what causes the game to eventually crash

Not entirely sure whats happening but it seems like foodfunk is creating too many onClientTick event listeners

removing foodfunk solves the problem

Steps to reproduce the behavior:

  1. Start the game
  2. Wait a bit while on main menu

Expected behavior Nothing

Logs wouldve used pastebin but its too big https://mega.nz/file/B1RlxYgD#gl-KN0nhbYYHB4nhf8Xluv_DazbTWnnq1TEIn35IThc

Config files foodfunk https://mega.nz/file/1wJzmaoJ#yiHKDDrFVWZ-Tn830v7jWi4RXDzKSpteBPXKaAA632k wumple https://mega.nz/file/AkJTASbY#f2rhEx228v6IcYi5g5ueRweROMxhBas8hwzzZ3h3vps

Additional context This only started happening after I changed some configs. I replaced the contents of the foodfunk config with an earlier version and the problem still happened, I wouldntve changed anything in the wumpleutil config, and im not sure what i changed in other configs.

big-099117109 commented 3 years ago

looking into the error, i can't be certain its foodfunk causing this, but having somewhere between 100,000 to 540,000 listeners still seems excessive

gatoborrachon commented 3 years ago

@Stormwind99 i will create an issue once i find the guilty mods, but i would like to add to this one:

i tried the mod since it is exactly what i was looking for (something similar to TFC), but every time i looked at the freezer, the game started to lag so badly, i will try to see the involucred mods, but i wish you will fix this, there's nothing like this mod

Dread131313 commented 3 years ago

I just had a crash also (dont worry, it was unrelated to this mod) and I was looking at the log files and a LOT of logging seems to be happening regarding ticking. I mean, I get why its doing that - but is it possible having a lot of ticking on each item could be causing performance issues?

Dread131313 commented 3 years ago

2021-05-06_060300

This is what happens when I open an immersivecraft cupboard with some raw meat and cooked meat inside. Prolly gonna have uninstall the mod for now, as ive never really had to deal with this before.

Dread131313 commented 3 years ago

I can confirm this mod was the cause of all the lag above. Once I removed it, the tick lag went away. Minecraft 1.12.2 version. This is in a modpack of 350 mods so I am unsure if this is a mod interation/bug with another mod or not. All I know is, I lag like crazy with this mod installed and I dont when its uninstalled. Ill keep an eye on this mod for updates because I really want to use it.

gatoborrachon commented 3 years ago

I am unsure if this is a mod interation/bug with another mod or not

well, by what big-099117109 said, it seems to be fault of FoodFunk.

i would like to suggest to @Stormwind99 to see how TFC Implements that system, but i don't think that he will fix this, there are no Commits since january 2020

joe-vettek commented 2 years ago

I also have a lot of lag, a bit uncomfortable.Especially when I opened the container, I set the decay rate of the box, and it got stuck at this time.

joe-vettek commented 2 years ago

I think a good solution is to extend the tick inspection time. The default is 90 ticks, which is 4.5 seconds. I think it is a good idea to change to 1200tick. It does not need to be tested so frequently. Even 12000 ticks are not bad. After all, MC has 20 minutes a day.