Sodium

Sodium

44M Downloads

Magma Cube & Blaze Causes Lag

spxctreofficial opened this issue ยท 0 comments

commented

Version information

mc1.18-0.4.0-alpha5

Expected Behavior

60-120 magma cubes should not drop performance down to around 40-50FPS. Slimes average around 170FPS with around 60-120 slimes rendered. Blazes shouldn't affect the performance much either.

Actual Behavior

Performance dropped from a 200FPS average to around 40-50FPS, with major stutters and frame drops when rendering about 100 magma cubes or blazes. No noticeable performance was noticed when tested with slimes, wither skeletons, guardians, vexes, ravagers, pandas, or any other entity.

My guess for this performance drop is the entity renderers for these two specific mobs are not being optimized well enough. This issue also seems to be reproducible in 1.17.1 and seems to affect framerates in the basalt delta biome and nether fortress structures, which will be devastating since these locations are by far the most dangerous in the nether.

I also tested OptiFine and OptiFabric as a control variable, and no issues were detected there. Even with 200 magma cubes, OptiFine and OptiFabric still ran comfortably with 100+ FPS without any stutters or frame drops, and without the help of Lithium or Starlight either (although the performance difference with using Starlight should be negligible anyway since that solely optimizes the lighting engine of Minecraft).

These are screenshots I took of the different framerates in different benchmarking scenarios. The benchmark is not scientific in any way, but it gives a good representation and example of the issue and how it is affecting the framerate. https://imgur.com/a/PigimMr

Reproduction Steps

  1. Spawn about 60-120 magma cubes or blazes.
  2. Use F3 to monitor framerates. The framerate should drop drastically.
  3. Use /kill @e[type=magma_cube] for the magma cubes, and the magma cubes should split into separate entities, causing the performance to slow to a halt.

Java version

AdoptOpenJDK 17.0.1

CPU

Intel Core i7-6700

GPU

AMD Radeon RX 560 2GB

Additional information

Tested with Sodium, Sodium Extra (for framerate counter), Lithium, Starlight, and LazyDFU on 1.18. The issue is only present when using Sodium, as switching to OptiFabric on 1.18 or even Forge 1.18 with Optine causes less performance deficit.

I also experienced similar slowdowns in 1.17.1 when entering basalt deltas, since magma cubes spawn there. Other than the crazy amount of particles in the basalt deltas, the game still lagged when particles were turned off.

These are screenshots I took of the different framerates in different scenarios. https://imgur.com/a/PigimMr