Skip to content

StyledText: drawing with block selection can be very slow #3523 - #3542

Open
tmssngr wants to merge 2 commits into
eclipse-platform:masterfrom
syntevo:feature/3523-slow-block-selection
Open

StyledText: drawing with block selection can be very slow #3523#3542
tmssngr wants to merge 2 commits into
eclipse-platform:masterfrom
syntevo:feature/3523-slow-block-selection

Conversation

@tmssngr

@tmssngr tmssngr commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

StyledText.getSelectionRanges() is quite expensive: for a larger number of selected rows it can take up to ~30-40ms on my machine. Invoking this method for each drawn row (!) is very inefficient, because it expensively calculates the same information again and again. Hence, we just invoke it one time for each drawLines invocation.

StyledTextRenderer.intersectingRelativeNonEmptySelections: only create a point instance if we need it

…atform#3523

StyledText.getSelectionRanges() is quite expensive: for a larger number
of selected rows it can take up to ~30-40ms on my machine. Invoking this
method for each drawn row (!) is very inefficient, because it
expensively calculates the same information again and again.

Hence, we just invoke it one time for each drawLines invocation.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  212 files  +   36    212 suites  +36   27m 41s ⏱️ + 2m 40s
4 898 tests ±    0  4 874 ✅ ±    0   24 💤 ± 0  0 ❌ ±0 
7 074 runs  +1 137  6 906 ✅ +1 119  168 💤 +18  0 ❌ ±0 

Results for commit 3183837. ± Comparison against base commit 3e3b24b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant