-
Notifications
You must be signed in to change notification settings - Fork 513
Closed
Labels
Milestone
Description
There are a few performance issues in GetText implementation:
- It's recreating regular expression every time, rather costly, especially on .Net framework.
- Even using regular expression itself is not idea. The reason is that even single white space is a match when no replacement is actually needed, but it will still be performed.
- Usage of reused StringBuilder is not optimal, because new string is always allocated.
Suggestion: do not use regular expression, aim for not a single allocation when no change is needed.
yanrez and eturnersumi