8138cdc3d9
Build: split Dart debug info out of libapp.so (13.96 -> 11.27 MB, symbols kept in the cache) and fix icon tree shaking, which Flutter 3.44's Linux CMake backend silently disables by quoting the define; the build image patches its SDK copy (MaterialIcons 1.6 MB -> 25 KB). Impeller cannot be enabled in a Linux release build and was slower in a profile-build bench. Install: `./install --linux --install` installs the bundle into <prefix>/lib/app-linux with com.pipelines.app.desktop (the GTK/Wayland app id), its icon and a ~/.local/bin/pipelines-app link, through scripts/install-linux-app.sh. Linux gaps: notifications through the freedesktop daemon; HTML artifacts explain the missing web view instead of throwing; no Share for files; a GTK clipboard reader for pasting files and screenshots (Ctrl+V and Omarchy's Super+V); GTK header bar only on GNOME; window icon. Bench: native fixture frame log, wheel/mark steps and tool/perf/linux_desktop_bench.py (private Xvfb); results in app/notes/linux-desktop-optimized.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
70 lines
3.6 KiB
Markdown
70 lines
3.6 KiB
Markdown
# Linux desktop: optimized build, Linux gaps, bench
|
|
|
|
Flutter 3.44.6, Docker build image (`app/docker`), tank (Ryzen, RTX 2080 Ti,
|
|
Omarchy/Hyprland). Measured 2026-12-03.
|
|
|
|
## Build flags
|
|
|
|
- `flutter build linux --release --split-debug-info` (symbols kept in the
|
|
build cache as `.debug-info/`, not archived): libapp.so 13.96 MB -> 11.27 MB.
|
|
- Icon tree shaking was silently off: Flutter's CMake backend
|
|
(`tool_backend.dart`) passes `-dTreeShakeIcons="true"` with literal quotes.
|
|
The Linux build image patches its own SDK copy (grep-guarded).
|
|
MaterialIcons-Regular.otf 1,645,184 -> 24,952 bytes.
|
|
- Bundle 37.1 MiB -> 33.1 MiB; archive 16.1 MB -> 14.3 MB.
|
|
- Not used: `--obfuscate` (no speed gain, breaks symbol names in errors);
|
|
Impeller (below).
|
|
|
|
## Impeller
|
|
|
|
The Linux release engine ignores engine switches (`FLUTTER_ENGINE_SWITCHES`
|
|
is read only in debug/profile builds) and `FlDartProject` has no Impeller
|
|
setter, so a release Linux build cannot opt in. Measured in a profile build
|
|
on Xvfb/llvmpipe (`tool/perf/linux_desktop_bench.py`, 3 runs, medians):
|
|
|
|
| renderer | startup | scroll frames | raster sum | raster median | worst frame |
|
|
|---|---|---|---|---|---|
|
|
| Skia (default) | 1553 ms | 31 | 1141 ms | 29.4 ms | 168 ms |
|
|
| Impeller GL | 1919 ms | 14 | 1600 ms | 103.5 ms | 302 ms |
|
|
|
|
Impeller was slower and dropped frames on the CPU rasteriser; no GPU numbers
|
|
(see below). Skia stays.
|
|
|
|
## Linux vs web (same fixture, same 30-notch wheel scroll of a rich chat)
|
|
|
|
| build | startup / first frame | frames | build sum | build max | raster sum | raster max |
|
|
|---|---|---|---|---|---|---|
|
|
| Linux release, Xvfb + llvmpipe (CPU), 1280x720 | 1241 ms (process launch) | 43 | 59 ms | 11.0 ms | 1031 ms | 105 ms |
|
|
| Web wasm, headless Chromium, no GPU, 1280x800 | 896 ms (navigation) | 57 | 126 ms | 18.3 ms | 2485 ms | 130 ms |
|
|
| Web wasm, headless Chromium, GPU, 1280x800 | 278 ms (navigation) | 69 | 128 ms | 10.6 ms | 174 ms | 8.9 ms |
|
|
|
|
Medians of 5 runs. Build (UI thread) time is GPU-independent: native
|
|
~1.4 ms/frame vs web ~1.9-2.2 ms/frame. Raster on the CPU: native 21 ms median
|
|
vs web ~44 ms mean. Native startup counts process launch, GTK, engine and
|
|
llvmpipe shader setup; the web figure starts at navigation in a running
|
|
browser, so the two are not like for like.
|
|
No Linux GPU raster or Wayland numbers: nothing here runs a GPU-backed
|
|
headless Wayland or X server (no cage/weston; Xvfb is software only), and the
|
|
operator's Hyprland session was not used.
|
|
|
|
## Linux gaps fixed
|
|
|
|
- Notifications: the bridge reported Linux unsupported; now uses
|
|
flutter_local_notifications' D-Bus implementation with the bundle icon.
|
|
- HTML artifacts: `WebViewController()` throws on Linux (no webview
|
|
implementation); the view now explains and points at Download.
|
|
- Share: share_plus throws for files on Linux; Share is no longer offered.
|
|
- Clipboard paste of files/screenshots: new GTK reader
|
|
(`linux/runner/clipboard_files.cc`) answers `pipelines/clipboard_files`;
|
|
Ctrl+V (also Omarchy's Super+V) in the composer. Compiled and contract-
|
|
tested in Dart; not exercised against a real clipboard here.
|
|
- Window: GTK header bar only on GNOME (no second title bar in a Hyprland
|
|
tile); window icon on X11; installer desktop entry `com.pipelines.app.desktop`
|
|
= GTK application id = Wayland app id.
|
|
|
|
Unchanged and already native: url_launcher (xdg-open plugin), file_picker
|
|
(xdg-desktop-portal FileChooser), keyboard shortcuts (Ctrl on non-Apple),
|
|
terminal (Dart xterm). The session cookie is stored by shared_preferences
|
|
(`~/.local/share/com.pipelines.app/shared_preferences.json`) as on the other
|
|
native platforms; there is no keyring-backed storage in the app.
|