All posts

8 posts

Performance

Profiles, benchmarks, memory and binary size.

  1. 6 min readPerformance, Web

    Most of the page was four fonts

    A first visit to a sip page moved 11.7 MB. Most of it was four TTF files that nobody had compressed. WOFF2 and gzip took it to 4.4 MB, and dropping a fallback that no browser could reach took the binary from 30.1 MB to 24.6 MB.

  2. 7 min readPerformance, Agents

    A wait that made the pane 197 times slower

    An agent that waits for output with tuios wait-for made a flooding pane three times slower. I fixed how often the wait looked. On the libghostty-vt backend the same test still said 197 times, because each look read the history one cell at a time.

  3. 8 min readPerformance

    Making the binary smaller, and the idea that made it bigger

    Seven commits took the tuios release binary from 30.0 MB to 23.8 MB. A plan to leave screen saver data out of the binary made it 23.5 KB larger instead.

  4. 12 min readPerformance

    A full scrollback cost 232MB per pane, twice: once in the daemon and once in each client

    A 112-byte cell made every scrollback line cost the full pane width. Packing cells, then storing lines as text, took a full ring from 232MB to 2.2MB.

  5. 11 min readPerformance

    Most of a scroll was spent on blank cells

    A ten-character line scrolling off a 207-column screen walked the whole row twice. One int per row cut the short-line scroll from 1,120 ns to 240 ns, measured on a machine that would not sit still.

  6. 3 min readRendering, Performance

    The renderer was drawing a backlog it had caused

    A flooded tuios pane kept painting 1.2 s after its source exited. The client's own renderer caused the backlog, and pacing by queued bytes halved the tail.

  7. 5 min readRendering, Performance

    A fifth of every frame went to changing nothing

    A profile put 19.8% of the tuios client in lipgloss.Wrap, rewrapping pane text already the right width. Skipping it was easy. Proving the skip safe was the work.

  8. 9 min readPerformance

    The benchmark said 27x faster. It felt worse.

    Fixing pane resize lag in TUIOS with Go benchmarks and pprof. Two of four theories were wrong, and the benchmark measured the wrong thing for three rounds.