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

Optimize Textarea’s wrap() #456

Closed
meowgorithm opened this issue Jan 16, 2024 · 3 comments
Closed

Optimize Textarea’s wrap() #456

meowgorithm opened this issue Jan 16, 2024 · 3 comments
Assignees

Comments

@meowgorithm
Copy link
Member

As discussed in charmbracelet/bubbletea#831 (comment), let's memoize Textarea's Wrap() function to improve performance.

@mikelorant
Copy link
Contributor

Can we please get #427 merged as this provides immediate benefits to the performance of textarea.

I believe combing this with the replacing runewidth.StringWidth with uniseg.StringWidth should give us a giant bump in performance such that there will be far less complaints about performance with this component.

@meowgorithm
Copy link
Member Author

meowgorithm commented Jan 22, 2024

Agreed — we should generally switch to uniseg.StringWidth; should also happen in muesli/termenv upstream.

@maaslalani
Copy link
Contributor

Fixed by #427

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

No branches or pull requests

3 participants