mojira.dev
MC-5417

Large amount of chests and shulker boxes creates FPS drop

The bug

When a large amount of chests are in a nearby area, the FPS drops very low.

Additional note

Performance has deteriorated significantly since version 1.13.

How to reproduce

Use the provided

[media]

world to test or use this command when you are in an open area:

/fill ~ ~ ~ ~20 ~20 ~20 minecraft:chest

Screenshots/Videos

Here is an example in video:

[media]

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media][media]
Anon Ymus

Chests are tile entities which also suck a lot of resources. Lag is not a bug. Also, 10 chests trigger that much lag? I have 14 in my singleplayer world with absolutely no lag.

Patrick Grønhøj

That is true they are, in a way i wish they could be optimized in a way, and only way for that to happen to notify a bit about it.

also 10 chests is no problem, 100 isn't, but 10.000+ chests and it does lag, trust me.

Anon Ymus

Oh, ten thousand?

Patrick Grønhøj

Yes Ten thousand+. I like having a large storage place for my items 😉

Anon Ymus

Sorry, the U.S. has . and , switched.

kumasasa

Removed decimal separator from 10 mil in the description (in english speaking countries the comma is the thousands separator and dot the decimal separator)

Patrick Grønhøj

ah alright, that does explain some, thank you, i'm danish so it's not always easy.

Dean Baset

This does make sense. Chests are tile entities, and this relates with signs, which are also tile entities...

Pixelgraph

I only noticed this in the player market in Lavacraft.

Marios

If you travel away from that place so that it unloads and look straight (not up, not down) and wait for chunk updates to drop to 0, how many fps do you get? What's the java's cpu usage at that point?
Also how many fps do you get in that warehouse with 0 chunk updates and what's the cpu usage?

Talven81

Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Anon Ym

This world has 7296 chests and as many trapped chests. FPS drop from 60 (at a distance from which the chests are not visible) to 8 (at a distance from which all chests are visible). Also, while staying close to the chests, the time spent in root.gameRenderer.level.entities keeps increasing for some time. I tested all this in 1.7.4.

Anon Ym

I made an interesting observation today: After installing Optifine, the FPS-Drop only happened while looking into the direction of the chests, similar to MC-14983. So at least it should be possible to reduce the problem into something like that. Also: Why is this bug still marked as unconfirmed?

galaxy_2alex

A chest is made out of at least 3 polygons, probably even more. Just 3 already need 3 times the resources to render. At some point, even a very good computer can't handle it. If you create a flat world full of chests, it probably would even lag the best computer.Java has limits. Mojang can't, as far as I can tell, do anything about it.

galaxy_2alex

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.

user-f2760

No response for over a year.

Asteraoth

Confirm for 1.9.3 pre-2

user-f2760

Reopened and gave report to @unknown.

Asteraoth

@FVbico Thanks and you forgot to reopen.

[Bot] Arisa

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Anonymous

I am quite sure it is due to the fact that chests are more advanced than your average block, and having lots of them rendered at a time drops FPS.

bdm68

This is very easy to replicate.

1. Create superflat void world. Set world to Peaceful. Unlimited frame rate, turn off Vsync.
2. Press F3 to get FPS settings without chests.
3. Use the fill command to insert 8000 chests in the world in a 20×20×20 cube.
4. Check FPS. -> It will be much lower
5. Pause game.
6. Check FPS -> Low FPS persists even when paused (it can be shown using Shift-F3 that chest rendering is the cause of the issue)

With my testing on a potato computer, I was getting about 150 FPS without chests, about 4 fps with 8000 chests.

BritishDerp

I hope to get this 'bug' some more attention by adding my observations.

Chests require a bit of optimising. They have become heavier and heavier on client FPS as new updates come out. 1.15.2 is terrible with large amounts of chests, getting closer and closer to unplayable now compared to 1.14.4 and previous versions.

In my SMP server (just for me and one other) my storage room/s contain about 2000 chests only (1000 double chests) and seeing as they are all in the same area, they are all rendered at the same time.
Obviously it was important to take the world into single player for testing to remove any effects from running it on a server - there was no difference between them, however.
My testing conditions included a 6 chunk render distance that allowed all the chests to be loaded, and nothing much else.

Test 1: I began by recording my FPS with everything normal (all 2000 chests) from a single point with all chests in my rendered FOV.
This granted only 35FPS.

Test 2: I replaced every single chest with air.
This granted 52FPS.

Test 3: I replaced every chest with hoppers.
This granted 48FPS.

Test 4: I replaced every chest with barrels.
This granted 49FPS.

Test 5: I replaced every chest with single chests (as they are normally all double chests).
This granted 36FPS.

 

Now this is all good proof of the effects chests cause in a real world situation. Here are the same tests in a brand new superflat world, also in 1.15.2.
My testing conditions included, again, a 6 chunk render distance, and a 20x20x20 cube of 8000 blocks.

Test 1: All air blocks.
This granted 142FPS

Test 2: All single chest blocks.
This granted 20FPS

Test 3: 50% (4000) single chest blocks.
This granted 37FPS

Test 4: All double chest blocks (4000 double chests).
This granted 18FPS

Test 5: All hoppers.
This granted 125FPS

Test 6: All barrels.
This granted 142FPS

From what I have learnt, chests are alike hoppers and barrels in that they are block entities, however, they have some differences. Barrels are full blocks, hoppers are non-full blocks, and chests are animated non-full blocks. I'd assume that it is a lot more demanding for the game to render an animated, non-full block, than other block entities.

Iosiv Visokogorskiy

Still present in 1.16.1

Iosiv Visokogorskiy

still happens in 20w27a

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a. Video attached.

Avoma

Can confirm in 21w14a.

Avoma

Can confirm in 21w17a.

ampolive

Can confirm in 1.17 Release Candidate 2. Drops from 50-60 to 12-15 fps.

Avoma

Can confirm in 1.17.1.

Iosiv Visokogorskiy

21w44a

Bloodlex

Could you please fix this? It's really important for my server, because we must have a lot of chests in one place and our players can't play. Their FPS drop to extreme low values 😞

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2.

Bloodlex

Will it ever be fixed?

El

Having these issues as well. Removing chests and signs greatly improved FPS. I am playing version 1.18.1

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.1.

Avoma

Can confirm in 1.19.2.

Fireswamped

Found a partial fix, (-DspriteAtlasTextures:false) will cause fps to range from 40 to 60 instead of 10 to 20 using same Chest Test.zip , note that in a lot of cases this problem is due to low memory amount.

J4PC

 There is a mod that addresses this issue: https://modrinth.com/mod/ebe

Fireswamped

J4PC the mod patches alike to my fix, does not completely remove.

Patrick Grønhøj

Asteraoth

(Unassigned)

Confirmed

Platform

Normal

Performance

chest, fps, fps-drop, performance

Minecraft 1.4.6, Minecraft 1.7.4, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, ..., 1.21, 1.21.1, 24w38a, 1.21.3, 1.21.4

Retrieved