diff --git a/docs/platform-notes.md b/docs/platform-notes.md index 556fd86..9280db4 100644 --- a/docs/platform-notes.md +++ b/docs/platform-notes.md @@ -26,6 +26,29 @@ Every platform seam carries a `PORTABILITY:` comment at the branch site. Remote (SFTP) paths are ALWAYS POSIX regardless of host or server OS (`path.posix` throughout `fs/sftp.ts`). +## Memory footprint (expected, not a bug) + +Investigated 2026-07 — packaged build. Roughly **~200 MB macOS / ~300 MB +Windows**, which is normal for a Bun + system-WebView app (30 MB is native / +no-web-engine territory; Tauri-class apps run ~80–200 MB, Electron 150–400 MB). +Not reducible to tens of MB without dropping the web UI. + +- macOS splits across several "miniSCP" processes: the **Bun main** (~120 MB: + backend + the bundled electrobun runtime + live SSH sessions — the largest and + least reducible piece), the **`views://app`** WKWebView content process (~60 MB, + the Angular UI), and the standard WebKit **Networking** / **Graphics and + Media** helpers. All are one app; WebKit just names them per-role. +- Windows is higher because **WebView2 is Chromium** (multi-process: browser + + GPU + renderer + utility + crashpad), vs macOS's lighter WKWebKit. +- Measure against a **packaged** build — `bun run dev` inflates the WebContent + heap (ng-serve, unminified, sourcemaps, live-reload) and is not representative. +- Verified non-issues: transfers stream (no whole-file buffering), icons + tree-shaken to ~33 glyphs, zoneless Angular, 364 KB prod bundle. +- Only real growth levers if this ever matters: the file list is **not + virtualized** (a directory with tens of thousands of entries retains a DOM row + each), and each open tab keeps both panels' full `entries` arrays; terminal + transfers are retained until cleared. None affect normal use. + ## Windows known issues (upstream electrobun, documented not fixed) - **HiDPI blur** — WebView2 renders at 1x on scaled displays