Prevent lag when saving data?Solved
When I save the data on my plugin, I do this.
foreach (var data in FurnaceStats) data.Value.Save(data.Key);​

however this makes the server lag like hell and takes 33000ms to complete. How do I save data without killing the server?

You could save the data over a period or move it to a coroutine to run in the background instead of main thread. Main issue with moving to a coroutine though, is the possibility of data corruption if something else saves it as well.
5e13a8d5b2bc5.jpg Wulf
You could save the data over a period or move it to a coroutine to run in the background instead of main thread. Main issue with moving to a coroutine though, is the possibility of data corruption if something else saves it as well.

I spread it out over time and it works wonderful now. Thanks

Locked automatically