Skip to content

Make fsync optional when saving a file

David Vorick requested to merge fsync into master

Fsync is really slow, to the point that it was causing signficant performance issues. Instead of file saving calling fsync by default for everything, fsync is only called for user action and for really important action that pertains to monetary changes or changes to network contracts. The result should be a significantly faster siad.

Further investigation has led me to believe that the bottleneck for some of the startup is actually not I/O, and not fsync, but instead is hashing. I also remember making this conclusion before. Regardless, we do a lot less fsync now, only during important calls. This might be worth looking over to figure out where I made what decisions, and to dispute any that you disagree with.

Merge request reports