The VS Code team has a really good article around their Text Buffer Reimplementation in the latest version. There is a lot of good information around performance and the implications of certain design patters revolving around file size.
The part that is very interesting is how the piece tree seemed to be the clear cut winner. It wasn’t until they tested a large file with a large amount of edits, that it stumbled more than the array. Articles like this fascinate me when Javascript is pushed to its limits.
VS Code Blog: VS Code Text Buffer Reimplementation