STYGION Optimize is the pile of small fixes we wrote while chasing lag on STYGION MC (a big Create / Sable modpack). Each one changes how fast something is computed, never what the result is, and each one has its own switch in the config.
Autosave and leaving players
- Player data (
.dat), statistics and advancements are still collected on the main thread, but compressed and written to disk on one background thread. Files go through a temporary file and a rename, so a crash never leaves a half-written file. A player who logs in again waits for their own files; server stop and/save-all flushwait for every file. (asyncPlayerFiles) - Advancements are not written again when nothing changed since the last write. (
skipUnchangedAdvancements) - With Sable: the disk sync (fsync) and closing of ship storage files run on the background thread instead of stalling the tick. (
sableAsyncSync) - One log line per autosave with the time it cost the main thread. (
logAutosaveOverMs)
Server tick
- Natural spawning: where the biome cannot change (all nearby biome cells hold the same single biome), the biome is read straight away instead of being blended again. At biome borders the vanilla lookup runs. Same biome, same mob, same random numbers. (
spawnBiomeShortcut) - Pathfinding: a path search reuses the empty chunk it built for an unloaded chunk instead of building a new one for every block lookup there. (
pathfindingEmptyChunkReuse) - With NTGL: its per-tick scan of all synced entity flags is skipped in ticks where no flag changed. (
ntglIdleSyncSkip)
Fixes for other mods (we found these while profiling; the mods are fine pieces of work and these are timing cases that only show up on a big, busy server)
- Carry On: players were sometimes disconnected ("Failed to encode packet",
carryon:sync_carry_data) when another player came into view, because the network thread encoded carry data the server was still changing. The packet now takes a copy when it is created. (carryOnSyncSnapshot) - Sable (server): a block that changes at the edge of the loaded world no longer makes Sable load or generate the neighbouring chunk on the main thread for its physics (stalls of 0.5 to 2.5 s, Sable issue #1160). The physics update waits until the chunk is loaded and is then applied the same way. (
sableNoSyncChunkLoads) - Sable (client): when a ship grows, only the sections you changed yourself are rebuilt at once; the rest is built in the background instead of stalling the frame. (
sableResizeBuild:PLAYER_AFFECTED/NONE/NEARBY= as Sable does)
Blocks of removed mods
- Blocks and items of mods you took out load as vanilla blocks instead of air plus an error per palette entry. By default the Create Propulsion platinum ores become stone and deepslate; the list is yours to edit and applies only to ids no installed mod registers. (
missingIdAliases,aliases)
Switching things off
Everything above is on by default and can be turned off, one by one, in config/stygion_optimize-common.toml (the aliases in config/stygion_optimize-startup.toml). The common config reloads while the server runs, so you can compare before and after in one session. At load the log lists what is on.
Other mods
Carry On, NTGL and Sable are optional: their parts do nothing when the mod is not installed, and nothing here is required. Thank you to the authors of those mods; we only touch them where our profiler pointed, and we leave their logic alone. If you are one of them and want something changed or removed, tell us on Discord and we will.
What it reads and sends
It sends nothing anywhere: no network connections, no telemetry, no update check. It reads and writes only the world and player files Minecraft itself uses (the same files, saved in the background), and its two config files.
Requirements
NeoForge 1.21.1, Java 21. No required dependencies. Versions of Carry On 2.2+, NTGL 3.2+ and Sable 2.0+ are supported when present.
Licence
All Rights Reserved. Use it on your server or in your modpack as CurseForge's terms allow; no copying, modifying or selling of its code or artwork.
Links: stygion.eu · Discord: stygion.eu/discord · Part of STYGION MC
Česky
STYGION Optimize je sbírka malých oprav výkonu z lovu lagů na STYGION MC (velký pack s Create a Sable). Každá mění jen to, jak rychle se něco spočítá, ne výsledek, a každá má vlastní přepínač v config/stygion_optimize-common.toml: autosave hráčů (data, statistiky, advancementy) se zapisuje na pozadí a atomicky, nezměněné advancementy se nepíšou znovu, Sable fsync běží v pozadí; spawn bez zbytečného míchání biomů, pathfinding bez stavění prázdných chunků pořád dokola, NTGL bez skenu v klidných tickách; oprava odpojování hráčů u Carry On, Sable bez synchronního načítání chunků na hlavním vlákně a (klient) bez synchronní přestavby rostoucí lodi; bloky odebraných modů se načtou jako vanilla místo vzduchu. Funguje na serveru, na klientovi i na obou, cizí mody jsou volitelné. Nic neposílá ven. All Rights Reserved.

