That will not be because of an array data structure for the lines.
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.
I'm sure then you'd be perfectly content if your otherwise perfect car were replaced with one identical in all ways except that the acceleration was 1/4 of the previous rate.
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.