Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I think for such large files you really need an editor that doesn't buffer the entire file into RAM and loads chunks in from disk on demand.

That's what mmap does: maps the entire file into the address space of the process while letting the kernel load the pages as they are touched. I assume that would improve performance significantly but I'm not sure if anyone's tried it.



That would be read-only though, so not an ideal solution for Sublime. Although one could mmap and then reference the original from a structure describing how the file was modified.

However mmaping files which can be modified by another process concurrently is tricky. You can just get killed by SIGBUS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: