September 19, 2016 Re: [WORK] std.file.update function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | One way to implement it is to open the existing file as a memory-mapped file. Memory-mapped files only get paged into memory as the memory is referenced. So if you did a memcmp(oldfile, newfile, size), it will stop once the first difference is found, and the rest of the file is never read. Also, only the changed pages of the memory-mapped file have to be written. On large files, this could be a big savings. |
October 18, 2016 Re: [WORK] std.file.update function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Wright | On Monday, 19 September 2016 at 02:57:01 UTC, Chris Wright wrote:
> You have an operating system that automatically checksums every file?
There are a few filesystems that keep checksums of blocks, but I don't see one that keeps file checksums.
|
October 18, 2016 Re: [WORK] std.file.update function | ||||
---|---|---|---|---|
| ||||
Posted in reply to R | On Tuesday, 18 October 2016 at 13:51:48 UTC, R wrote:
> On Monday, 19 September 2016 at 02:57:01 UTC, Chris Wright wrote:
>
>> You have an operating system that automatically checksums every file?
>
> There are a few filesystems that keep checksums of blocks, but I don't see one that keeps file checksums.
zfs , btrfs. If the checksum's accessible is anoher story.
|
Copyright © 1999-2021 by the D Language Foundation