Say I have 5 split views opened and I hit j to move down a line in one of them, all split views will re-render and re-highlight their content, making the editor noticeably lagging.
Perhaps we should attempt to remove this redundant and unnecessary calculations
for (view, is_focused) in cx.editor.tree.views() {
let doc = cx.editor.document(view.doc).unwrap();
self.render_view(cx.editor, doc, view, area, surface, is_focused);
}
I am not sure which part of render_view is particularly slow though. Although I suspect it's the tree-sitter highlight part, my computer has this weird encryption-anti-virus toolkit(company policy) installed that makes random things such as calling functions in DLL slow.
Likely tree sitter is slow. Only rerendering part of the screen is not feasible from an architectural standpoint, we don't have any form of damage tracking and I don't think we it's realistic to add that
Say I have 5 split views opened and I hit
j
to move down a line in one of them, all split views will re-render and re-highlight their content, making the editor noticeably lagging. Perhaps we should attempt to remove this redundant and unnecessary calculationssee helix-term/src/ui/editor.rs#L1502
I am not sure which part of
render_view
is particularly slow though. Although I suspect it's the tree-sitter highlight part, my computer has this weird encryption-anti-virus toolkit(company policy) installed that makes random things such as calling functions in DLL slow.