- 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.
str.Grow(estimatedSize)with size estimation to reduce memory reallocation duringstring building.
styleCachemap to avoid recreating identicallipgloss.Styleobjects for the same colorcombinations, reducing object allocation overhead.
Claude Code helped with this.