4 ms·
> I would be surprised if they use straight QStrings. Text editors typically use more sophisticated data structures for their text buffers - Ropes, Piece Tables
by TonyTrapp 5y ago
> I would be surprised if they use straight QStrings. Text editors typically use more sophisticated data structures for their text buffers - Ropes, Piece Tables, Gap Buffers, etc. - tuned for efficient text operations.
Sure, I didn't mean to imply that the whole document would be one giant QString. But those data structures might still use a QString as backing memory in the new implementation. I tried to have a look around, but didn't have too much time on hand to dive deep. I could see some QString usage but couldn't confirm if the document itself uses it for storage.
> Wouldn't Notepad++ use UTF-16 internally too, with its Windows heritage
Not necessarily, as the memory consumption of 586MB for a 500MB file shows.
- arka2147483647 5y agoI would suspect that it supports multiple encodings, and handle each of them natively
- jraph 5y agoIt could also handle one encoding internally and do the conversion when opening and saving the file.