fix: move async save commit off game thread to prevent disk I/O stall

StorageManager.SaveSaveData() blocks until the disk write completes.
Calling it from the game thread caused 2.5s freezes. Now it only runs
from TickCoreSystems() on the ServerMain thread, which operates
independently of the game tick loop.
This commit is contained in:
itsRevela
2026-04-01 01:49:58 -05:00
parent 68521f8c92
commit 9372b2d2ea
2 changed files with 1 additions and 6 deletions

View File

@@ -2258,11 +2258,6 @@ void MinecraftServer::tick()
PIXBeginNamedEvent(0,"Players tick");
players->tick();
PIXEndNamedEvent();
#if defined(_WINDOWS64)
// Commit any pending async autosave on the game thread (same thread
// that called Flush/AllocateSaveData, which StorageManager requires).
ConsoleSaveFileOriginal::CommitPendingAsyncSave();
#endif
PIXBeginNamedEvent(0,"Connection tick");
connection->tick();
PIXEndNamedEvent();