4 ms·
> Saving the file does take about a minute or two, though. Last time I strace-ed vim, it did a ftruncate to 0 on the original file before writing the whole con
by ethelward 7y ago
> Saving the file does take about a minute or two, though.
Last time I strace-ed vim, it did a ftruncate to 0 on the original file before writing the whole content back; so no suprise it's rather slow if it dumps 10GB on disk :)
- jolmg 7y agoYeah, I wasn't expecting it not to write the whole 10GB. I don't think optimizing to write just the changes is worth it. Probably no editor has done something like that. I mean if the user inserts or deletes near the beginning of the file, there's no other choice but to write the whole thing to shift the content, anyways. It's just not worth the additional complexity to minimize the writes.