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:
1 parent
68521f8c92
commit
9372b2d2ea
2 files changed
+1
-6
No files matched your search
@@ -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