Repository navigation
Optimize code rendering by adjusting viewport handling - #2974
Conversation
|
I like this. Here is what AI is suggesting and it makes sense to me. I think we can ignore the syntaxPointer thought for now... I think it's per character... I assume you'd have seen some very ugly syntax highligting with this patch if that were not the case. Nice perf improvement idea 👍 — I have two correctness concerns around highlight/selection:
Could we validate with cases where selection starts off-screen and ends on-screen, and with editor rect not filling the full screen? |
|
I ran your AI concerns with my AI. Seems the first concern is not valid, but the second is. It is also pretty trivial to fix the second issue. I am not very confident on AI analysis though --- better to let human knowledgable about this take a look what is actually needed. 1. Character/Byte Alignment of
|
|
Checked the skip against the cursor and delimiter records, which start at |
nesbox
left a comment
There was a problem hiding this comment.
Checked the skip against the cursor and the matched-delimiter records, which start at -1 and so cannot be drawn from the skipped range, and against scroll.y being a line count with one newline per row. Looks right.
and skipping on-visible lines.
we simply don't render anything above or below the view port. This gives significant speed up with large source code files,