FPS lag study

Hello,
Have you got low fps at certain places in HM? Well I certainly do. I have been working to reduce the lag you experience when visiting Aramega. A part of this effort has been studying which blocks cause lag and how much lag do they cause exactly.

1.Basics

First we need to go through some basic princibles of fps lag. We have regular blocks like stone and dirt what the world is mostly made of. You can make structures with hundreds of thousands of blocks large made of these, and it doesn’t affect your fps.

Where you get the lag from is a block type called block entity. These are blocks with some sort of function other than just filling space, like chests and furnaces. Alternatively they are functionless but different shape than the regular blocks, like player heads.
Full list of block entities can be found here: Block entity – Minecraft Wiki

The other way how block entities differ from regular blocks is the render distance. Generally if you are further than 63 blocks away from block entities, they won’t render. Some few block entities have different render distances, like with item frames it’s 31 blocks. The render distance is a spherical radius from you, so height matters.

They also don’t render if you are not looking to the direction where they are. So if you stand directly next to a vast amount of lag causing block entities but aren’t looking at it, it doesn’t affect your fps.

2.Results

There are dozens of different block entities, but my main focus were the ones that are regularly used in large quantities. These blocks are:

  • Item frame
  • Sign
  • Chest
  • Mob head
  • Shulker box
  • Barrel

I made cubes made of these in my creative world, and measured fps as I made the cubes larger and larger. I stood perfectly still while doing this. Moving would cause the fps to drop more. As a result I gave each of these items a weight, meaning how heavy the block is for the rendering engine. Weights for each of the block:

Item frame: 6.9
Sign: 5.0
Chest: 1.4
Mob head: 1.2
Shulker box: 1.0
Barrel: N/A (doesn’t affect fps).

You can use the weights to estimate how much your shop for example can cause lag using the next guidelines:

3000-4000: FPS starts to drop from 60
5000: FPS reduced by 20-30%
6000+: FPS reduced by 50%

These values work for me, but with your computer they might be different.
Calculation example:
200 item frames, 200 chests and 200 signs:
200 x 6.9 + 200 x 1.4 + 200 x 5 = 2660 (no fps reduction yet)

  1. Summary
  • Avoid item frames
  • Avoid signs
  • Replace chests with barrels, but chests aren’t the worst thing here
  • Don’t make megastores too close together

I might update this in case of mistakes or adding more blocks to the list.
-Ara

4 Likes

RIP signs

what about items inside item frames?

I placed items in every frame