Fluidlogged API

Fluidlogged API

305k Downloads

Major performance issues with flowing water?

TheComputerizer opened this issue ยท 2 comments

commented

Describe the bug
I cleared a lot of blocks at once while doing some testing in my pack which caused a lot of water to start flowing. This dropped me to 1 fps for a while and then afterwards settled around 8. Here is the spark report for that.

To Reproduce

  1. Clear a lot of blocks so that a lot of water starts flowing at once
  2. The game is now running at 1 fps

Expected Behavior
While I would expect a lot of flowing water to cause lag, the amount of lag seemed way out of proportion to the amount of water.

Additional context
I was running in Dimension Hopper so it could be an incompatibility with one of the performance mods.

Here are some screenshots for reference on how much water was flowing

commented

The problem is that Fluidlogged's BakedModelFluid does not cache fluid quads, which will make chunk meshing very inefficient as soon as there are a large quantity of fluids in the chunk.

commented

It looks like BakedModelFluid is made specifically to be not cached to fix #176.