Sublime Forum

More efficient buffer copy

#1

Are there any plans to make buffer copies more efficient?

Currently in ST3 one must copy Python strings which means that the memory use balloons rapidly for larger files and is often so slow that it freezes ST3 while this happens. There are hacks around the freezing like copying in blocks, but that adds its own complexity and is still slow if you need to convert back to bytes.

It would be nice if we could get access to the src without conversion or no copy at all.

This issue also affects ST3 itself: open a large file and make any change to it then close ST3. You will notice that ST3 freezes before it eventually closes, and when you re-open ST3 all changes are gone, presumably because the data is too big to be encoded as a JSON string.

0 Likes