Problem Statement
A sweep of the codebase and release pipeline found avoidable runtime overhead and bundle dead weight:
- Keyword-highlight rules were recompiled (one
RegExp per rule) on every terminal build, with the same conversion chain duplicated across three widgets
SessionProvider.setActive notified the whole tree even when re-clicking the already-active tab
- SSH agent messages were built with double list spreads in the auth hot path
local_auth was declared but never imported anywhere, pulling native plugins into the macOS/Windows bundles
- MesloLGS NF shipped 4 faces (~9.8 MB of the 11 MB font folder); italic faces are rarely hit in terminals
- Release builds shipped Dart debug symbols inside the AOT snapshot
Proposed Solution
- Memoize compiled xterm keyword rules in
SettingsProvider (cache keyed on rules-list identity + the enabled flag; rules are only ever replaced wholesale)
- Equality guard in
setActive
- Build agent messages with a direct buffer write
- Drop the unused
local_auth dependency
- Drop MesloLGS NF Italic / Bold Italic (−4.8 MB per bundle; the engine falls back to a synthetic slant)
--split-debug-info on all desktop release builds, with per-platform symbols zips attached to each release (flutter symbolize -d <symbols> to read crash traces)
Alternatives Considered
--obfuscate on top of split-debug-info — minimal extra size win, complicates every crash report; skipped
- Dropping the smaller Powerline fonts (~1.3 MB) — they are user-selectable font options; removing them is a feature regression for little gain
- Demand-driven SOCKS connection polling — rejected after verification:
PortForwardProvider.setConnections already equality-guards, so the idle 2 s sample is negligible
Additional Context
Implemented in #61. Several findings from the initial scan were rejected after code verification (recording buffer is already bounded by the 500 ms flush timer; the suspected RDP listener leak is held by the session and GC'd with it).
Problem Statement
A sweep of the codebase and release pipeline found avoidable runtime overhead and bundle dead weight:
RegExpper rule) on every terminal build, with the same conversion chain duplicated across three widgetsSessionProvider.setActivenotified the whole tree even when re-clicking the already-active tablocal_authwas declared but never imported anywhere, pulling native plugins into the macOS/Windows bundlesProposed Solution
SettingsProvider(cache keyed on rules-list identity + the enabled flag; rules are only ever replaced wholesale)setActivelocal_authdependency--split-debug-infoon all desktop release builds, with per-platform symbols zips attached to each release (flutter symbolize -d <symbols>to read crash traces)Alternatives Considered
--obfuscateon top of split-debug-info — minimal extra size win, complicates every crash report; skippedPortForwardProvider.setConnectionsalready equality-guards, so the idle 2 s sample is negligibleAdditional Context
Implemented in #61. Several findings from the initial scan were rejected after code verification (recording buffer is already bounded by the 500 ms flush timer; the suspected RDP listener leak is held by the session and GC'd with it).