charmbracelet / charmbracelet/bubbles

key: string-based parsing is inefficient

Open
#262 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.