Get the latest tech news
Zed Decoded: Rope and SumTree
In this episode of Zed Decoded, Thorsten asks the founders — Nathan, Max, Antonio — about the data structures at the heart of Zed: Rope and SumTree.
To do that, a text editor has to load the file contents into memory — you can't just let the user stare at the raw bytes on disk. To give you a taste: Emacs uses gap buffers, VS Code uses a twist on piece tables, Vim has its own tree data structure, and Helix uses a rope. They're not the best choice for an editor that only supports local editing patterns, since they leave a lot of performance on the table compared to gap buffers in that case (again, even for huge documents).
Or read this on Hacker News