OreCruncher / SoundControl

Mod for controlling sounds in Minecraft 1.14.4+
GNU General Public License v3.0
5 stars 4 forks source link

Causing ludicrous amounts of lag. #9

Closed brisingraerowing closed 4 years ago

brisingraerowing commented 4 years ago

I loaded up a game with this (and the other available modules), and I was getting insane TPS lag. The log was being spammed with

[03Mar2020 22:21:08.114] [SoundControl Sound Processor/WARN] [SoundControl/SoundFXProcessor]: SoundControl Sound Processor is lagging; behind 2622 msecs

with values always above 2500 ms. Removing the modules fixed the lag.

OreCruncher commented 4 years ago

1) What are the specs of your PC? 2) Any idea of how many sounds are playing at the moment? You can turn on debug logging in the Sound Control config and hit F3. 3) The sound processor runs on a background thread not the client thread. You can try changing "Background Workers" in the config to 2 or 3. May not help because lag usually is the result of something on the client thread. 4) Anything unusual in the client side log? 5) Modpack/list?

brisingraerowing commented 4 years ago

Some more testing and it seems to be related to a compat issue with Wild Nature. I've stopped using that as it has some rather annoying generation bugs.

OreCruncher commented 4 years ago

If you still have the client log available I want to take a look to make sure there isn't something I can do on my end.

EDIT: I loaded up the mod and I see what you see in terms of lag, though I don't get the spam related to my sound thread. This only happens when using WildNature world gen (not vanilla). It appears that memory gets consumed and then triggers the GC process which causes Minecraft to halt, and then continue a short bit before it happens again. I have seen cases in the past during world load that my sound thread can be delayed and get that report. It would not be unreasonable to think it could happen during GC.

brisingraerowing commented 4 years ago

I had 8GB set as the max. I wonder what Wild Nature is doing that makes it take so much RAM. Interesting. I’ll report to them.