On 9/18/16 12:15 PM, Chris Wright wrote:
This will produce different behavior with hard links. With hard links,
the temporary file mechanism you mention will result in the old file
being accessible via the other path. With your recommended strategy, the
data accessible from both paths is updated.

That's probably acceptable, and hard links aren't used that much anyway.

Awesome, this should be part of the docs.

Obviously, if you have to overwrite large portions of the file, it's
going to be faster to just write it. This is just for cases when you can
get speedups down the line by not updating write timestamps, or when you
know a large portion of the file is unchanged and the file is cached, or
you're using a disk that sucks at writing data.

That's exactly right, and such considerations should also go in the function documentation. Wanna go for it?


Andrei

Reply via email to