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

BreakIterator.GetBoundaries is exponentially slow depending on the size of the source text #127

Closed
atlastodor opened this issue Mar 31, 2020 · 1 comment
Labels

Comments

@atlastodor
Copy link
Contributor

Describe the bug

BreakIterator.GetBoundaries is exponentially slow depending on the size of the source text. In other words, the larger the size of the text parameter string is, the slower the function is, and the curve is not linear.

To Reproduce

string content = "... some large text, about 100KB ... ";
BreakIterator.GetBoundaries(BreakIterator.UBreakIteratorType.WORD, new Locale("eng"), content, false); // Takes about 10 secs.

Expected behavior

The BreakIterator.GetBoundaries to finish within milliseconds.

Environment

  • OS: Windows 10
  • Exact version of icu.net 2.6.0
  • .NET Framework 4.7
atlastodor added a commit to atlastodor/icu-dotnet that referenced this issue Mar 31, 2020
…w depending on the size of the source text
ermshiperete pushed a commit that referenced this issue Apr 1, 2020
@ermshiperete
Copy link
Member

Fixed by #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants