-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
perf: only create regex once #49
Conversation
You need to reset the |
This reverts commit 0078ce6.
That is quite subtle. Found some info about it:
|
Can you add a short code comment that states why we don't need to reset |
With chalk/wrap-ansi#51, a large portion of the time in wrap-ansi is now spent in ansiRegex because strip-ansi creates a new regex on every call and it's called for every word in wrap-ansi.
Before:
After: