Skip to content

perf(desktop): measure local workflows and record scale baselines - #152

Open
tiammomo wants to merge 5 commits into
wfnuser:devfrom
tiammomo:tiammomo/issue-20-desktop-benchmarks
Open

tiammomo wants to merge 5 commits into
wfnuser:devfrom
tiammomo:tiammomo/issue-20-desktop-benchmarks

Conversation

@tiammomo

@tiammomo tiammomo commented Sep 5, 2026 •

Copy link
Copy Markdown

Closes #20

Add reproducible 100/1,000/10,000-document local-engine benchmarks and frontend diagnostics, with recorded release measurements and raw samples. The recorded 10,000-document Linux baseline identifies Auto Save/rename/delete and working Review/diff as paths to profile before optimization.

The harness exercises engine open/search, checked Auto Save, rename/delete/import, Reviews/diffs, Background Change create/merge/discard, checkpoints and History on disposable Spaces. Reports include latency distributions, worker RSS, SQLite/Git bytes, and remaining worktrees. A normal offline smoke test covers the workflow; large measurements are opt-in. The UI benchmark measures navigation helpers, PageReader SSR and production asset sizes. Production indexing, mutation locking and Git behavior are unchanged.

The September 12 metadata review is addressed in both report writers. Schema version 2 embeds the source commit and dirty state, Rust/Cargo/Node versions, and actual corpus/sample/fixture settings captured before measurement. Missing metadata is null. Child workers receive the parent's effective sample settings. Existing schema version 1 baseline files are preserved as historical measurements.

Validation in hardened verifier containers: full frontend tests/lint/production build, Rust formatting/tests, Clippy with warnings denied, UI benchmark, and the real offline engine smoke. New regressions cover clean/dirty/non-Git provenance and compare report settings against actual collected samples. Both real JSON writers were also exercised with non-default sample settings. The full release benchmark at all three sizes was run for the original baseline; this metadata revision does not claim new performance measurements or a speedup.

Measurement limits: the historical baseline used Linux/WSL2 on a shared i7-12700H host, with a four-core/8-GiB container. Process-cold means a fresh worker with a healthy index, not evicted OS caches or Tauri startup. Five mutation samples make p95 the maximum. UI SSR/helper measurements exclude browser layout/paint and scrolling. Repeat on the target desktop before setting budgets; commands and raw samples are in docs/desktop-performance.md and docs/desktop-performance-baseline.md.

Before this dev refresh, combined validation with #151 and #154 passed Windows MSVC checks/Clippy and 123 Windows Rust tests under Wine (four intentional ignores and the documented Windows Node runtime exclusion). This exposed a smoke-test assumption that Rust/Cargo must be installed in the runtime; the test now accepts the report's documented null provenance for unavailable tools. Wine is additional compatibility evidence, not native Windows acceptance.

Includes dev at 661d3b2. The September 13 integration resolves both merge conflicts while retaining the new comments, HTML View and workspace-context frontend tests and the comments Rust module. The final committed tree passed all frontend checks, 114 Rust tests (two large benchmark entry points ignored), Clippy, the UI report writer and the offline engine smoke in an independent verifier. Historical measurements remain unchanged. Fresh upstream Actions may require maintainer approval.

Prepared with Codex assistance, reviewed through RepoSteward, and published after independent verification. tiammomo reviewed the final diff and takes responsibility for this contribution.

Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com>
@netlify

netlify Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cowiki-test ready!

Name Link
🔨 Latest commit b54e7a1
🔍 Latest deploy log https://app.netlify.com/projects/cowiki-test/deploys/6aa67c2f1d59db0008e50755
😎 Deploy Preview https://deploy-preview-152--cowiki-test.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

results.push(serde_json::from_str::<Value>(result).unwrap());
eprintln!("Measured {count} documents.");
}
let report = json!({

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] The machine-readable report is not self-identifying enough for later comparisons. The accompanying prose records the source SHA and Rust/Node versions, but the JSON does not, so copied or regenerated reports can easily be compared against the wrong revision/toolchain. Please include at least the source commit, Rust/Cargo version, and relevant benchmark settings in this report (and mirror the same provenance in the UI report).

@wfnuser

wfnuser commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Review summary: the benchmark scope and caveats are unusually clear, and the checked offline workflow is a good guard against collecting timings from broken operations. The targeted benchmark smoke test passes locally. I left one inline reproducibility comment: the raw reports need source/toolchain/settings provenance inside the JSON, not only in the companion prose. Also, Netlify does not compile or run the Rust benchmark module, so please have a maintainer approve the normal GitHub Actions run before merge.

…top-benchmarks

Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com>
Address review comment 3994914618 on wfnuser#152. Refs wfnuser#20.

Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com>
The report contract permits null metadata when Git or Rust tooling is unavailable. Preserve the offline workflow smoke under cross-compiled Windows/Wine execution. Refs wfnuser#20.

Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com>
Preserve the new comment, HTML and workspace tests alongside benchmark provenance checks. Keep both comments and benchmark Rust modules. Refs wfnuser#20.

Signed-off-by: tiammomo <26957354+tiammomo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(desktop): measure local engine and UI bottlenecks before optimizing

2 participants