Skip to content

Commit 09c9b69

Browse files
authored
Merge pull request #222 from ryanoneill/docs/compact-str-rationale
Document CompactString rationale in EnhancedCell module
2 parents 1eb0e17 + 8d606dc commit 09c9b69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/cell/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
//! Enhanced cell type that captures more information than ratatui's Cell.
2+
//!
3+
//! Uses [`CompactString`] for cell symbols to avoid heap allocation for typical
4+
//! single-character cells. At 80×24, a terminal has 1,920 cells per frame;
5+
//! `CompactString` stores up to 24 bytes inline, eliminating thousands of
6+
//! small allocations per render cycle.
27
38
use compact_str::CompactString;
49
use ratatui::style::{Color, Modifier, Style};

0 commit comments

Comments
 (0)