Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisation for wcwidth #1789

Merged
merged 8 commits into from
Nov 23, 2018
Merged

Optimisation for wcwidth #1789

merged 8 commits into from
Nov 23, 2018

Conversation

jerch
Copy link
Member

@jerch jerch commented Nov 18, 2018

Handles things discussed in #1785:

  • optimized table creation (down to under 0.5 ms)
  • runtime speedup
  • fix slighty off surrogate pair handling

The PR comes with a regression test against the old implementation (can be removed with a later release). Also currently the table is created on lib loading, this should be changed to an explicit table creation by some managment code to avoid unused tables with multi unicode support. Imho this can be addressed in #1714 as well.

src/CharWidth.ts Outdated Show resolved Hide resolved
src/InputHandler.ts Outdated Show resolved Hide resolved
src/CharWidth.ts Outdated Show resolved Hide resolved
src/CharWidth.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Made a couple of minor style fixes

@Tyriar Tyriar added this to the 3.9.0 milestone Nov 23, 2018
@jerch jerch merged commit a693eb8 into xtermjs:master Nov 23, 2018
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.

2 participants