4 ms·
> Or Sublime Text, from launch, opening a 1MB text file, modify 10 chars at the beginning, save, and exit. Edit: NVM, it's written in C++ It doesn't use a "gap
by davidgay 8y ago
> Or Sublime Text, from launch, opening a 1MB text file, modify 10 chars at the beginning, save, and exit. Edit: NVM, it's written in C++
It doesn't use a "gap"? Or some other appropriate text-editing data structure?
- derefr 8y agoI think the parent commentor was referring to the problem that happens when you go to save. (Which is, really, just a problem with how filesystems only allow files to be represented as little seek(2)able character devices. If there was an API that would let a userland program treat a [sparse] file's data as a vector of extents—and arbitrarily manipulate that vector, such as by creating a new raw on-disk extent, writing data to it, and then prepending it to the file's extents list—then this performance problem would disappear, without any filesystem even having to change its data architecture.)