Apologies if this has been reported before, I searched for "save" and "saving" and could not find anything relevant.
This issue has occurred since 20w14a. There is a workaround on a server, to disable sync-chunk-writes, but there is no workaround in singleplayer.
To reproduce in singleplayer, start a world and close it again, observe that the world can take tens of seconds to close. To reproduce on a dedicated server, start the server and type stop in the console, and observe that the server hangs for a bit after printing the "saving chunks for level" message.
Given that this hasn't been reported yet, I'm assuming it may be operating system dependent, although I haven't tested this on other operating systems. My OS is Ubuntu 18.04 (see the environment section).
I ran the server through VisualVM. I have attached a screenshot of part of the profile results, as well as a CSV containing the entire snapshot.
Linked issues
is duplicated by 2
Attachments
Comments 6
I will update the bug report to mention that `sync-chunk-writes` seriously needs optimizing, and also point out that there is no way to disable it in singleplayer (and no progress bar).
This is most likely caused by the recent changes to the world saving logic.