mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-07-09 11:08:43 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user