On 4/30/2013 8:37 AM, Joshua Cranmer 🐧 wrote:
On 4/30/2013 12:33 AM, Ehsan Akhgari wrote:
On 2013-04-29 1:51 PM, Taras Glek wrote:
Writes of data <= ~64K should just be implemented as atomic whole-file
read/write operations. Those are almost always single blocks on disk.

Writing a whole file at once eliminates risk of data corruption.
Incremental updates are what makes sqlite do the WAL/fsync/etc dance
that causes much of the slowness.

Is that true even if the file is written to more than one physical
block on the disk, across all of the filesystems that Firefox can run on?

OS.File.writeAtomic works correctly regardless of file size (it's
basically "write to temporary, move temporary to real filename"), which
works correctly so long as the move is not a cross-filesystem move.

Just don't do it too frequently: https://bugzilla.mozilla.org/show_bug.cgi?id=438316

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to