- Pre-allocated string builder: Add
str.Grow(estimatedSize) with size estimation to reduce memory reallocation during
string building.
- Style caching: Implement a
styleCache map to avoid recreating identical lipgloss.Style objects for the same color
combinations, reducing object allocation overhead.
Claude Code helped with this.