Documentation
¶
Overview ¶
Command idlemem launches apps and reports how much memory each takes once idle, alone and with the processes it runs, its webview's: scripts/bench.ts measures release builds of examples/hello and examples/counter-native with it on every push to main. It needs a desktop session.
go run ./internal/idlemem [-count 3] [-idle 6s] app...
Each app runs count times, for idle each time, and the medians print as JSON, by the name of the app's file: {"hello": {"app": bytes, "total": bytes}}. Memory is what each platform shows for a process:
- macOS: the physical footprint, as Activity Monitor shows it, of the app and of the WebKit processes that started with it and share its responsible process (a terminal, say, for an app not in a bundle);
- Linux: the proportional set size of the app and of its descendants, WebKitGTK's processes, so that pages they share count once;
- Windows: the private working set, as Task Manager shows it, of the app and of its descendants, WebView2's processes.