The more challenging part of a text editor is making sure you only render what the user sees.
The more challenging part of a text editor is making sure you only render what the user sees.
Which has almost nothing to do with data structures and optimization. I've used dozens of text editors. I have never once thought "man, that thing is slow". But I have thought "man, that thing is a bug-ridden, unintuitive piece of garbage" many, many times.
You’re either lying or incapable to detect typing latency.
Try typing while CLion indexes stuff in background or open couple hundred thousand line file in VS Code with Vim plugin and let me know how it goes.
When properly done, plugins/extensions are in separate process which do not hang the main UI thread. It helps if these processes has a low priority. Also, ionice is good when processing many documents.
Another flaw of many extensions/language servers have, is the lack of abort controller implementation. This means that debouncing doesn't work. So if there are many document updates, the server would hang.
My car doesn't go at the speed of sound. That doesn't mean I think "man, this car is slow" each time I drive it.
But if the same car suddenly stops, and I have to open all the doors and close them again in order to keep going, that sure is a problem.
Just because you don't consider it a problem, doesn't mean it's not a problem.
Weren't you the one lamenting about ML having potential to being 100-1000x faster if only there were real™ software engineers to implement them?
> My car doesn't go at the speed of sound. That doesn't mean I think "man, this car is slow" each time I drive it.
This isn't even remotely valid example. Put your car on track against faster cars and you'll quickly arrive to `man, this car is slow`.
The formatting is often difficult enough that it will need a separate data structure anyways.
the original Eclipse was so godawful slow, this was back in the days where you would install Textpad after installing Java because it would pick up your classpath during installation and configure it for you. Java 1.4 I think.
[0]: https://en.wikipedia.org/wiki/Rope_(data_structure) [1]: https://en.wikipedia.org/wiki/Order_statistic_tree