performance / what-the-profiles-no-longer-show

performance / what-the-profiles-no-longer-show

What the profiles no longer show

v0.12.0 · 04 / 06 · 1 min read · docs/BENCHMARKS.md

Before, the top of a render was ansi.wrap, bytes.Buffer.WriteByte and

  1. Pool or reuse the line buffers in the renderer: 50 K allocations per large render is the GC pressure when the width is genuinely new. Returning to a width already rendered is now a cache hit, so this only pays on the first draw at each width.
  2. A cheaper highlight path for in-page search: only the matched lines need repainting, but today the whole screen is rebuilt per keystroke (this is now the dominant cost of a search, ~31 ms).
  3. Incremental history: keep an index (url → offset) so a 5000-entry history does not re-parse on every list.

edit this page on GitHub ↗report a problem ↗