SPB Git

Repository Public

PERFORMANCE.md 3.4 KB

# NEXTERM — Performance (measured, not estimated)

Method. Scripts/perf.sh drives the Release build through System Events in an isolated data directory: launch time is measured from open until the first on-screen window (CGWindowList probe every 20 ms); memory is the process RSS from ps; CPU is ps %cpu (a cumulative average since process start, so values taken right after creating many panes overstate idle load — see notes); throughput pipes 200 MB of text through one pane with yes | head -c and times it in the shell; restoration quits (which saves) and relaunches a 32-pane workspace.

Environment. Apple M5 Max (18 cores), 48 GB, macOS 27.0 (26A5425a), Xcode 27.2, Release configuration, SwiftTerm Metal renderer, Menlo 13 pt, external 5K display as main screen. Numbers are from a single run on 2026-11-01; re-run Scripts/perf.sh to refresh.

# Results

Metric Value Notes
Hardware Apple M5 Max, 18 cores, 48 GB macOS 27.0
Build Release configuration NEXTERM 0.1.0
Launch → first window 350 ms fresh workspace, 1 shell
Memory, 1 session 115 MB RSS after 2 s
Idle CPU, 1 session 0,0 % ps %cpu after 5 s idle
Memory, 4 sessions 117 MB RSS 4 child shells alive; idle CPU 0,0 %
Memory, 8 sessions 119 MB RSS 8 child shells alive; idle CPU 0,0 %
Memory, 16 sessions 124 MB RSS 16 child shells alive; idle CPU 0,2 %
Memory, 32 sessions 132 MB RSS 32 child shells alive; idle CPU 0,1 %
Sustained output 40 MB/s 200 MB via `yes
Idle CPU, 32 sessions 0,1 % after burst settled
Restore 32-pane workspace window 594 ms, all 32 shells 648 ms layout restored, new processes
Memory after restore 130 MB RSS 32 sessions

# Notes and limitations

  • Launch 350 ms (open → first on-screen window) includes creating the SQLite database, starting CLI discovery (async) and spawning the first login shell; binary already in the file cache. A first run after a reboot will be slower.
  • Per-pane memory ≈ (132 − 115) / 31 ≈ 0.55 MB RSS per additional pane at the app level; each pane also owns a zsh process (not counted). SwiftTerm allocates scrollback lazily (10 000 lines configured).
  • Idle CPU stays at 0–0.2 % with 1–32 sessions (cumulative ps %cpu, so this includes the split storm).
  • Sustained output 40 MB/s for 200 MB of text into one maximized pane with 31 other panes alive, app CPU 4.9 % cumulative during the burst — the UI stayed responsive (System Events kept driving menus).
  • Restoration of a 32-pane workspace: first window at 594 ms, all 32 new shells running at 648 ms.
  • Input latency was not instrumented (no automated keystroke→frame probe exists yet); interactive use (vim, Claude Code TUI) showed no perceptible lag during the acceptance runs.
  • Resize storms: live window resizing with vim/top open was exercised manually during acceptance tests (grid updates followed the window, no stale frames after the container-sizing fix).
  • Memory leaks were not profiled with Instruments in this session (Instruments' CoreDevice plug-in is broken on this Xcode/macOS pair); the session registry removes terminal views from their superview on close and all observers are owned by the container view.
  • Not measured: Intel, multi-GPU, or App Nap behaviour in the background.
Files main
Menu

Theme