dexman545 / Fabric-Autoswitch

Automagical switching of tools to the best one for the job, for Minecraft
https://www.curseforge.com/minecraft/mc-mods/fabric-autoswitch
GNU Lesser General Public License v3.0
24 stars 6 forks source link

Extreme FPS drops when holding right click when building #51

Closed jonalange closed 1 year ago

jonalange commented 1 year ago

First of all: I rebound (swapped) left and right click. So for me this problem actually occurs when I hold left click (placing block, eating food etc.) but I will talk about right click because that's the common keybind everybody else uses.

For some reason after some time (longer sessions without restarting the game) it happens that I have extreme FPS drops (down to 2 FPS) when I try to build and hold rightclick to place multiple blocks. Also happens when eating. When I then hit the keybind for auto switch to toggle everything goes back to normal (when auto switch is deactivated). When activated again the problems happens again.

It feels like that the mod is looking for updates so often that it causes the whole game to lag.

Hardware isn't an option here. I run a Ryzen 9 5900X with RTX 3080 Ti and 12 GB allocated to minecraft.

I have some other mods installed, but it's still pretty lightweight (in terms of big modpacks).

If you need any logs from me let me know.

dexman545 commented 1 year ago

Please provide a log file, and if possible a spark profile when the lag occurs.

dexman545 commented 1 year ago

Does the same also happen when attacking?

jonalange commented 1 year ago

@dexman545 What exact logs and spark profile do you need? Never used spark and will do my best to give you what you need. I look into it when I'm at home later. But no, it doesn't happen when attacking. At least that's what I think, because I don't hold the attack button with the sword. But while digging it's no problem.

dexman545 commented 1 year ago

I need the standard MC log file. I received a similar report for attacking with AS via curseforge, and their log showed a lot of log spam - that isn't from AS, so likely a mod conflict between AS and some mod.

For Spark, just a normal spark profile. It should automatically upload the profile, so I just need the link to that. In game, once you can reproduce the lag, run /sparkc profiler start, reproduce the lag for a bit, then run /sparkc profiler stop.

jonalange commented 1 year ago

@dexman545 Sorry for the late reply. Didn't play that much the last few days and when I did I didn't had the problem as much.

Today I had this problem again, but not as extreme. It dropped from 60-70 FPS (with shader) down to 20-30 FPS Not as bad as it used to be. But my sessions just isn't long enough right now

https://spark.lucko.me/l8hxYcxbd7 latest.log

dexman545 commented 1 year ago

Thanks for the profile.

Good news: I think I see where the issue is coming from. Bad news: I'm making a shot in the dark at fixing it.

Here is an alpha version that may fix the issue. Please let me know if it does or does not. https://github.com/dexman545/Fabric-Autoswitch/releases/tag/test

dexman545 commented 1 year ago

Closing as this seems to be fixed.