Files
TUIkit/Sources
phranck 176cfc0db3 Refactor: Cache FrameBuffer.width, eliminate redundant regex and ioctl calls
Three caching optimizations for the render pipeline:

1. FrameBuffer.width is now a stored property, recomputed only when
   lines mutates (didSet). Eliminates ~125 redundant ANSI-stripping
   regex runs per frame from repeated .width accesses.

2. strippedLength counts visible characters by subtracting ANSI match
   lengths instead of allocating an intermediate stripped string.

3. RenderLoop.render() calls terminal.getSize() once per frame instead
   of terminal.width + terminal.height (2 ioctl syscalls → 1).

All 455 tests passing.
2026-02-02 22:10:37 +01:00
..