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

refactor(textinput): reduce allocations #413

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

naglis
Copy link
Contributor

@naglis naglis commented Aug 30, 2023

As the number of items in suggestions and m.suggestions is known, we can use make with the expected size instead of appending, which requires more allocations as the slice grows.

As the number of items in `suggestions` and `m.suggestions` is known,
we can use `make` with the expected size instead of appending, which
requires more allocations as the slice grows.
@maaslalani
Copy link
Contributor

Thanks so much for the PR @naglis, very much appreciated ❤️

@maaslalani maaslalani merged commit ec88302 into charmbracelet:master Jan 8, 2024
9 checks passed
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.

3 participants