

This causes chunk lookups - and block updates, block lookups, tile entity lookups, etc - to take O(sqrt(N)) time instead of O(1), where N is the number of loaded chunks.įor a server with 10 players and a view-distance of 10, there will be 4410 loaded chunks, and chunk lookups will be up to 66 times slower than they should be, or 20 times slower in the best case.ĭoubtful.

The hash function used starts by XOR'ing the chunk's X and Z coordinates, so that many nearby chunks will get the same hash. Minecraft stores all loaded chunks in a hash table. The majority of people have never decompiled Minecraft to understand how naive and slow it was initially. Why does Scaevolus's awesome shader mod Optifine even exist? Because of Minecraft's poor performance -> poor code -> poor design. JahKob has claimed that this format is up to 7 times faster than the previous system. The McRegion format was adopted nearly unchanged, except for the addition of a table of chunk update timestamps. How did we end up with the new region file format? Because of Scaevolus's excellent chunk optimization, McRegion, which was blatantly used. I've criticized Minecraft's facing direction clusertfuck in the past. Groupthink + an inconvenient truth is never popular.
