sodium-fabric icon indicating copy to clipboard operation
sodium-fabric copied to clipboard

Villagers causing significant lag

Open Markrealhd opened this issue 1 year ago • 4 comments

Bug Description

Villagers are causing the FPS to drop by a minimum of 50%, even if they are not visible because of blocks. This makes playing in a world with villager trading stations almost impossible, even if there are only 20-30 villagers. The FPS only drops when looking in the direction of the building the villagers are in and goes back to normal when looking in another direction. I do not have any FPS drops using Sodium 0.5.5. (Tested in a singleplayer world using no resourcepacks or other mods then Sodium 0.5.7)

Reproduction Steps

Spawn a bunch of villagers into a closed building, and watch the FPS when looking at the building.

Log File

latest.log

Crash Report

crash-2024-02-01_13.22.30-client.txt

Markrealhd avatar Feb 01 '24 12:02 Markrealhd

Memory: 5939132416 bytes (5663 MiB) / 8808038400 bytes (8400 MiB) up to 14680064000 bytes (14000 MiB)

Why are you allocating 14 GB of RAM? Your entire system only has 16 GB of RAM. This is way too much and you're going to starve the operating system.

jellysquid3 avatar Feb 02 '24 01:02 jellysquid3

I heard that the system only needs <2gb when running in the Background without any other heavy processes, so I didn't see a reason to allocate less in the maximum.

Markrealhd avatar Feb 02 '24 08:02 Markrealhd

I can't reproduce a regression, and nobody on our Discord has been able to find one with just Sodium either. Looking through the changes between Sodium 0.5.5 and 0.5.8, there is nothing in particular that would cause a regression to entity rendering performance.

However, it appears that Iris has made some regressions of its own with entity rendering recently. Are you sure this problem only happens with Sodium, and that Iris isn't required to cause it?

jellysquid3 avatar Feb 03 '24 06:02 jellysquid3

Yes, I noticed it first with Iris, but thought it was due to sodium because it also led to fps drops without Iris, just not as extreme.

Markrealhd avatar Feb 03 '24 17:02 Markrealhd