sync-chunk-writes often takes over a minute to close a world
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.