Lode 效能實測:Tauri + Rust 的 macOS 檔案工具啟動與記憶體數據
在 Apple M1 Max 上實測,Lode 的暖啟動中位數為 0.27 秒、idle 記憶體約 106 MB、安裝檔 11.6 MB。 這篇把量測方法、原始數據、以及可重現的腳本全部攤開——數字怎麼來的比數字本身更重要。
檔案工具(folder compare、hex viewer、全文搜尋)的使用模式是高頻、短時:一天開關幾十次、每次用幾秒。在這種模式下,「啟動要等多久」和「閒置吃多少記憶體」是兩個最有感的指標——這也是 原生 vs Electron 差距最明顯的地方。
測試環境
| 項目 |
值 |
| 機器 |
Apple M1 Max |
| 作業系統 |
macOS 26.5.1 |
| Lode 版本 |
0.2.20260610(Direct Sale / GitHub 版) |
| 架構 |
Apple Silicon 原生(aarch64) |
| 量測日期 |
2026-06-10 |
數據是單一機器、單一版本的快照,不是跨機種統計。重點在「方法可重現」——你可以在自己的 Mac 上跑同一支腳本驗證。
1) 啟動時間
方法:用腳本量「open Lode → 主程序就緒 + Lode 新起的 WebKit WebContent 子程序出現」的時間,當作「UI 可互動」的近似。每次量測前先 quit 再重開(暖啟動),重複 5 次。
| Run |
啟動時間 |
| 1 |
0.368 s |
| 2 |
0.274 s |
| 3 |
0.275 s |
| 4 |
0.270 s |
| 5 |
0.274 s |
| 中位數 |
0.274 s |
第一次(0.368 s)略高是因為剛 quit、檔案快取尚未回溫;之後穩定在 0.27 秒附近。這是暖啟動自動量測值;真正的冷啟動(重開機後第一次)會略高,但實際使用體感仍在一秒以內。
對照:典型 Electron App 因為每次都要載入完整 Chromium + Node runtime,啟動通常落在 2–5 秒(此為一般公開觀察值,非本次量測)。
2) idle 記憶體
方法:用 vmmap --summary <pid> 取每個 process 的 Physical footprint(Apple 的真實記憶體指標,比 RSS 準)。Lode 是 Tauri + WKWebView 架構,會有主程序 + WebKit 子程序,要全部加總才是真實佔用。量測時只留 Lode 開著、沒開任何檔案(idle baseline),並關掉 Safari 等其他會起 WebKit 子程序的 App。
| Process |
Physical footprint |
lode(主程序,Rust) |
36.0 MB |
com.apple.WebKit.WebContent(UI) |
64.1 MB |
com.apple.WebKit.Networking |
6.0 MB |
| 合計(idle baseline) |
≈ 106 MB |
約 106 MB 的 idle 佔用,對一個帶 GUI 的原生工具來說相當輕。對照典型 Electron App 的記憶體基線 150–300 MB(公開觀察值),同時開多個工具時這個差距會累積——每個 App 省下的記憶體,在 8 個 App 的開發環境裡就接近 1 GB。
⚠️ 量測陷阱:com.apple.WebKit.WebContent 這個 process 是所有用 WKWebView 的 App 共用的名稱。如果量測時 Safari 或其他 Tauri/WebView App 開著,它們的子程序會被誤算進去。要拿到乾淨數字,務必只留 Lode。
3) 安裝體積
| 項目 |
大小 |
.dmg 安裝檔(v0.2.20260610) |
11.6 MB |
解壓後 Lode.app |
≈ 26 MB |
因為 Lode 用系統 WebView 而非捆綁 Chromium,安裝檔只有約 12 MB。對照功能相當的 Electron App,安裝檔常在 80–150 MB 以上——下載快、佔硬碟少、自動更新的增量也小。
量測方法可重現
這些數字不是宣傳口號,是一支腳本跑出來的,你可以自己驗證。核心邏輯只有兩段:
啟動時間——量「open 到 Lode 主程序 + 新 WebContent 出現」:
# 先快照「開 Lode 前已存在的」WebContent,再開 Lode,
# 輪詢直到「Lode 主程序」與「新的 WebContent」同時出現
before=$(pgrep -f "WebKit.WebContent")
open -a Lode
# ... 計時直到 pgrep -f "Lode.app/Contents/MacOS/" 且出現新的 WebContent
記憶體——用 Physical footprint 加總 Lode 全部相關 process:
for p in $(pgrep -f "Lode.app/Contents/MacOS/") \
$(pgrep -f "WebKit.WebContent") \
$(pgrep -f "WebKit.Networking"); do
vmmap --summary "$p" | grep "Physical footprint:"
done
Rex 親身經驗:我會堅持量「Physical footprint」而不是 Activity Monitor 隨手看的數字,是因為 Tauri App 的記憶體散在主程序和 WKWebView 子程序裡,只看主程序會嚴重低估。第一版腳本我還踩了個雷——用 process 名稱 Lode 比對抓不到主程序(實際 process 名是小寫 lode),導致啟動偵測一路 timeout;改用 bundle 路徑 Lode.app/Contents/MacOS/ 比對才正確。量測工具自己也要先 debug,數字才可信。
數據總表
| 指標 |
實測值 |
測試條件 |
| 暖啟動(中位數, n=5) |
0.27 s |
M1 Max, macOS 26.5.1 |
| 冷啟動 |
一秒以內 |
體感值,正式逐格量測待補 |
| idle 記憶體 |
≈ 106 MB |
單視窗, 主程序 + WebKit 子程序 |
.dmg 安裝檔 |
11.6 MB |
v0.2.20260610 |
Lode.app |
≈ 26 MB |
解壓後 |
| 最低系統 |
macOS 12(Monterey) |
— |
| 架構 |
Apple Silicon 原生 |
aarch64 |
常見問題
Q:這些數字是冷啟動還是暖啟動?
A:表中 0.27 秒是暖啟動(quit 後再開)的自動量測中位數。冷啟動(重開機後第一次)會略高,但實際體感仍在一秒以內;正式的逐格量測(螢幕錄影)會在之後補上。
Q:為什麼記憶體比一般「Tauri 很省」的印象高?
A:因為 WKWebView 會另外起 WebContent / Networking 子程序,把它們加總才是真實佔用(約 106 MB)。只看主程序(36 MB)會低估。即使如此,仍明顯低於 Electron 的 150–300 MB 基線。
Q:Intel Mac 上的數字呢?
A:Lode 對外發行(Direct Sale / GitHub)目前是 Apple Silicon 原生版,本文數據也都來自 Apple Silicon,未涵蓋 Intel。
Q:我可以自己重現嗎?
A:可以。用上面兩段指令的邏輯,在你自己的 Mac 上量。記得量記憶體前只留 Lode 開著、關掉 Safari 等 WebView App。
延伸閱讀
Measured on an Apple M1 Max, Lode’s warm-start median is 0.27 s, idle memory is ~106 MB, and the installer is 11.6 MB. This post lays out the method, the raw numbers, and a reproducible script — how the numbers were obtained matters more than the numbers themselves.
File tools (folder compare, hex viewer, full-text search) are used in a high-frequency, short-duration pattern: opened dozens of times a day, used for seconds at a time. In that pattern, “how long until it’s usable” and “how much memory it idles at” are the two metrics you feel most — and exactly where native beats Electron most clearly.
Test Environment
| Item |
Value |
| Machine |
Apple M1 Max |
| OS |
macOS 26.5.1 |
| Lode version |
0.2.20260610 (Direct Sale / GitHub build) |
| Architecture |
Apple Silicon native (aarch64) |
| Date measured |
2026-06-10 |
These are a single-machine, single-version snapshot — not cross-device statistics. The point is reproducibility: you can run the same script on your own Mac to verify.
1) Startup Time
Method: a script times from open-ing Lode to the moment its main process is up and a new WebKit WebContent child process appears — a proxy for “UI interactive.” Each run quits and relaunches (warm start), repeated 5 times.
| Run |
Startup time |
| 1 |
0.368 s |
| 2 |
0.274 s |
| 3 |
0.275 s |
| 4 |
0.270 s |
| 5 |
0.274 s |
| Median |
0.274 s |
The first run (0.368 s) is slightly higher because caches haven’t warmed up right after a quit; it then stabilizes around 0.27 s. This is the warm-start automated figure; a true cold start (first launch after reboot) will be a bit higher but still feels under a second in practice.
For context, a typical Electron app loads a full Chromium engine plus a Node runtime on every launch, usually landing at 2–5 seconds (a common published observation, not measured here).
2) Idle Memory
Method: vmmap --summary <pid> gives each process’s Physical footprint (Apple’s real memory metric, more accurate than RSS). Lode is a Tauri + WKWebView app, so it has a main process plus WebKit child processes — you must sum them for the true footprint. Measure with only Lode open and no file loaded (idle baseline), and close Safari and other apps that spawn WebKit processes.
| Process |
Physical footprint |
lode (main, Rust) |
36.0 MB |
com.apple.WebKit.WebContent (UI) |
64.1 MB |
com.apple.WebKit.Networking |
6.0 MB |
| Total (idle baseline) |
≈ 106 MB |
About 106 MB at idle is light for a native GUI tool. Against a typical Electron baseline of 150–300 MB (a published observation), the gap compounds when several tools are open — the memory each app saves approaches 1 GB across an 8-app developer setup.
⚠️ Measurement pitfall: com.apple.WebKit.WebContent is a shared process name across all WKWebView apps. If Safari or another Tauri/WebView app is open during measurement, its children get miscounted. For a clean number, keep only Lode running.
3) Install Size
| Item |
Size |
.dmg installer (v0.2.20260610) |
11.6 MB |
Unpacked Lode.app |
≈ 26 MB |
Because Lode uses the system WebView instead of bundling Chromium, the installer is about 12 MB. An equivalent Electron app’s installer often runs 80–150 MB or more — faster to download, smaller on disk, smaller incremental updates.
Reproducible Methodology
These numbers aren’t marketing copy — they come from a script you can run yourself. The core logic is two snippets.
Startup — time from open to main process + new WebContent:
# Snapshot WebContent processes that exist *before* launching Lode,
# then open Lode and poll until both the Lode main process and a
# *new* WebContent process appear.
before=$(pgrep -f "WebKit.WebContent")
open -a Lode
# ... time until pgrep -f "Lode.app/Contents/MacOS/" AND a new WebContent appears
Memory — sum Physical footprint across all Lode-related processes:
for p in $(pgrep -f "Lode.app/Contents/MacOS/") \
$(pgrep -f "WebKit.WebContent") \
$(pgrep -f "WebKit.Networking"); do
vmmap --summary "$p" | grep "Physical footprint:"
done
From Rex’s experience: I insist on measuring Physical footprint rather than a glance at Activity Monitor because a Tauri app’s memory is split between the main process and the WKWebView children — looking at the main process alone badly underestimates it. My first version of the script even hit a bug: matching the process by the name Lode failed (the real process name is lowercase lode), so startup detection timed out every run. Switching to a bundle-path match (Lode.app/Contents/MacOS/) fixed it. The measurement tool itself needs debugging before the numbers can be trusted.
Summary Table
| Metric |
Measured |
Conditions |
| Warm start (median, n=5) |
0.27 s |
M1 Max, macOS 26.5.1 |
| Cold start |
under a second |
subjective; formal frame-count pending |
| Idle memory |
≈ 106 MB |
single window, main + WebKit children |
.dmg installer |
11.6 MB |
v0.2.20260610 |
Lode.app |
≈ 26 MB |
unpacked |
| Minimum OS |
macOS 12 (Monterey) |
— |
| Architecture |
Apple Silicon native |
aarch64 |
FAQ
Q: Are these cold-start or warm-start numbers?
A: The 0.27 s in the table is the warm-start (quit-then-relaunch) automated median. A cold start (first launch after reboot) is a bit higher but still feels under a second; a formal frame-by-frame measurement (screen recording) will follow.
Q: Why is memory higher than the “Tauri is tiny” reputation?
A: Because WKWebView spawns separate WebContent / Networking processes; summing them gives the true ~106 MB. Looking at the main process alone (36 MB) underestimates. Even so, it’s well below Electron’s 150–300 MB baseline.
Q: What about numbers on Intel Macs?
A: Lode’s public distribution (Direct Sale / GitHub) is currently the Apple Silicon native build, and all figures here are from Apple Silicon — Intel isn’t covered.
Q: Can I reproduce this?
A: Yes. Use the logic in the two snippets above on your own Mac. Before measuring memory, keep only Lode running and close Safari and other WebView apps.
Further Reading