I thought the deco writes were 0 as the log says, so it was confusing what was going on, but it turns out the list is cleared before the log happens, so it is writing out, in a 8k world, about 71000 entries, totally over 1 MB. Tried on my HD, but still not horribly slow, then on a flash drive, which gave a 7 second write time! The save timer is every minute, but there is a dirty check, so it does not always do the save.
The deco save code was changed a few months ago by another programmer to fix a problem with old saves, so it might have been only doing partial saves before, but since it does the whole thing now in any event, and on the main thread, it does lead to a large frame spike.
The simple solution was to write it into a memory stream, which is faster than a file stream anyway, then another thread does the actual file save, so minimal frame spike. This probably won't make 19.2, but hopefully 19.3.
...
Read more