Skip to content

#414: slow StyledTextRenderer for unicode and unprintable control cha…#1439

Open
tmssngr wants to merge 1 commit into
eclipse-platform:masterfrom
syntevo:feature/414-styledtext-slow-rendering2
Open

#414: slow StyledTextRenderer for unicode and unprintable control cha…#1439
tmssngr wants to merge 1 commit into
eclipse-platform:masterfrom
syntevo:feature/414-styledtext-slow-rendering2

Conversation

@tmssngr
Copy link
Copy Markdown
Contributor

@tmssngr tmssngr commented Sep 3, 2024

…racters

This test replaces the characters 0x00-0x1F with some alternative character (by default '?') for rendering. This improves the performance significantly.

The previous pull request (#1425) did not work.

Note, that when changing replaceBelowSpaceCharacters to return the commented unicode characters, the snippet will fail with a "No more handles" exception. I reckon, we best should stick to a US-ASCII character from the range 0x20<=..<0x7F.

@tmssngr tmssngr requested a review from niraj-modi as a code owner September 3, 2024 09:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 3, 2024

Test Results

   486 files  ±0     486 suites  ±0   7m 43s ⏱️ +4s
 4 151 tests ±0   4 143 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 358 runs  ±0  16 266 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit c37643d. ± Comparison against base commit d882cfb.

♻️ This comment has been updated with latest results.

@tmssngr tmssngr force-pushed the feature/414-styledtext-slow-rendering2 branch from af468e0 to 176f48a Compare September 3, 2024 17:52
@tmssngr
Copy link
Copy Markdown
Contributor Author

tmssngr commented Sep 3, 2024

My commit used the correct, approved email address, but I've created the pull request with my GitHub account. Don't know why eclipsefdn/eca complains.

@iloveeclipse
Copy link
Copy Markdown
Member

My commit used the correct, approved email address, but I've created the pull request with my GitHub account. Don't know why eclipsefdn/eca complains.

This commit should only have committers / authors with ECA signed, but you see there two different identities : syntevo@176f48a

ECA wants clarity regarding the code origin, so that every contribution is legal.

@tmssngr tmssngr force-pushed the feature/414-styledtext-slow-rendering2 branch from 176f48a to c37643d Compare September 3, 2024 18:27
@mihnita
Copy link
Copy Markdown
Contributor

mihnita commented Sep 6, 2024

I wonder if it has something to do with the "Interpret ASCII control characters" setting
(under Settings -- Run/Debug -- Console)

I know that setting is only about the Console, but the console is implemented on top of StyledText.
So maybe the root cause is that processing.
I don't know if that "interpreting" is done in the console, or somewhere lower level, in StyledText somewhere

}

private static char replaceBelowSpaceCharacters(char chr) {
if (chr >= 0x20 || chr == '\t' || chr == '\r' || chr == '\n') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider allowing more?
Other characters that are used in CLI applications:

  • \u0007 : BELL, makes a "beep" sound
  • \u0008 : BS, backspace, moves back one character
  • \u001B : ESC, used for ANSI escape sequences (changing colors, cursor movement, clear screen, etc). This one is used quite a lot.

Since the Eclipse Console is built on top of the styled text widget not allowing ESC might break quite a lot of things.
(see https://eclipse.dev/eclipse/news/4.25/platform.php#debug-ansi-support)

…able control characters

This test replaces the characters 0x00-0x1F with some alternative
character (by default '?') for rendering. This improves the performance
significantly.
@akurtakov akurtakov force-pushed the feature/414-styledtext-slow-rendering2 branch from c37643d to 56b34d1 Compare June 1, 2026 19:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Test Results (win32)

   30 files  ±0     30 suites  ±0   5m 13s ⏱️ ±0s
4 703 tests ±0  4 628 ✅ ±0  75 💤 ±0  0 ❌ ±0 
1 233 runs  ±0  1 209 ✅ ±0  24 💤 ±0  0 ❌ ±0 

Results for commit 56b34d1. ± Comparison against base commit 9ab3898.

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.

4 participants