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

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Test Results

  212 files  ±0    212 suites  ±0   28m 41s ⏱️ +4s
4 950 tests ±0  4 924 ✅ ±0   26 💤 ±0  0 ❌ ±0 
7 138 runs  ±0  6 958 ✅ ±0  180 💤 ±0  0 ❌ ±0 

Results for commit 06e97c5. ± Comparison against base commit 4e29ac0.

♻️ This comment has been updated with latest results.

@tmssngr
tmssngr force-pushed the feature/3523-slow-block-selection branch 3 times, most recently from 28b7595 to 02d8c0c Compare September 3, 2026 12:43
…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.

Fixes eclipse-platform#3523
@tmssngr
tmssngr force-pushed the feature/3523-slow-block-selection branch from 02d8c0c to 06e97c5 Compare September 3, 2026 13:11
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