← Back to context

Comment by z3t4

10 years ago

I'm working on an editor in JavaScript. You would be surprised how fast string operations, like concatenation, are in JavaScript! You can hold the entire buffer in a String! While browsers renders text very well, the DOM is relative slow to interact with, but there are other ways to render in JavaScript, for example the Canvas, or into a terminal, or even stream a video, or talk directly to a display.

That's really what JavaScript was made for: editing HTML (strings) on-the-fly. It has been optimized well, indeed.

What kind of data structure are you using for edits?