Skip to content
PRISM
How Prism saves time

How Prism saves time

Overview

Prism does less work for the same game. Every optimisation below is on by default and has its option to turn it off; those that could change a contraption's timing say how to keep a farm exact.

Mobs

  • Far mobs think less often (performance.mob-ai): within 12 blocks of a player (full-ai-distance) nothing changes; further away a mob chooses what to do next every few ticks, up to every 10 (max-ai-interval). It keeps moving smoothly. Villagers, allays, copper golems and bosses always think every tick (ai-exclude): iron farms and breeders keep their exact timing.
  • Villagers shut in a cell rest (villagers.rest-when-trapped): a traded villager that cannot walk anywhere stops looking for a bed, a job site or a mate it could not reach.
  • Entity caps per chunk and kind (entity-caps): past 60 monsters or animals in a chunk, natural spawning, spawners and breeding add no more of that kind. Commands, plugins and spawn eggs are never refused.
  • Crowds (crowd-search): in a pen or a pile of items, the entities a mob pushes and the items a hopper takes are found through a grid made once a tick: the same entities, in the same order.

Items, hoppers, vehicles

  • Items and orbs at rest (items.rest) do their full work one tick in four, and stacks merge as soon as they land.
  • Idle hoppers sleep (hoppers.sleep) until something around them changes, and move items on the very tick Minecraft's would.
  • Minecarts and boats at rest (vehicles.rest) rest too; a pile of carts pushes itself at most 8 times a tick, and their Bukkit events are made only when a plugin listens.

Regions under load

  • A tick budget (tick-budget, 45 ms): past it, what can wait does, far from players only: a turn to think, a path to compute again, natural spawning.
  • Region pressure (region-pressure): a region over 30, 40, then 50 ms a tick cuts secondary work step by step (far mobs, natural spawning, random ticks), and gets it back once it keeps up.
  • Adaptive simulation distance (simulation.adaptive) and memory pressure (memory): the distances step down when the server cannot keep up, and come back.

Players

  • The locator bar is worked out once a tick, when a player entered another block (locator-bar-by-block): with walking players, 85 % fewer of its packets.
  • Entity tracking of busy regions is shared between threads when the work calls for it (async.tracking), and each player's packets reach its network thread in one go (tracking-grouped).

Storage and redstone

  • Prism's region format (regions.format): worlds a third smaller, each chunk checksummed, recovered after a power cut.
  • Redstone limiter (redstone): a chunk whose redstone flips more than 400 times a second for 5 seconds is frozen for 30 seconds, and the console says where.