charmbracelet / charmbracelet/bubbles
key: string-based parsing is inefficient
Open
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
Every time a bubble calls `key.Matches` the key is rendered as a string and then the string is compared.
This is inefficient, and also the heap allocation (1 for each `case` in the switch!) creates noise in the go GC.
Contributor guide
Assessment
This issue has not been assessed yet.