Performance
- Network work is off the main thread. Pings run on their own threads with a timeout, and the selector only reads a cache. A dead server never freezes the menu.
- Files are off the main thread. Player settings are read while the player logs in and written on a background thread. Config and data saves are queued the same way.
- Movement toys are event based. There is no timer polling players. The pad and portal checks only run when a player moves to a different block.
- Sidebars only send changes. Each player has their own board, and a line is only sent again when its text changed.
- Particles are capped. Portal outlines only show when a player is within
portals.particle-range, and the count per portal isportals.particles-per-portal. - Holograms, NPCs and the parkour timer are light. Holograms refresh once a second by default and only when their chunk is loaded. NPCs only turn their head when a player is within 8 blocks. The parkour action bar updates every 2 ticks for players in a run only.
- Everything is cleaned up. On disable mcHub removes sidebars, boss bars, tab text, hidden players, the flight permission it gave, display entities and join items, and closes its menus.
The timers that do run: the sidebar (sidebar.update-ticks), the tab list (tab.update-ticks), the boss bar (once a second), the status refresh (network.refresh-seconds), open selectors, the portal outlines and a two-second time lock.