Skip to content

research: isolated Tauri 2 UI spike for Windows resource comparison - #52

Closed
man612 wants to merge 13 commits into
mainfrom
experiment/tauri2-react-spike-20261024
Closed

man612 wants to merge 13 commits into
mainfrom
experiment/tauri2-react-spike-20261024

Conversation

@man612

@man612 man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Purpose

Explore whether a Tauri 2 shell could improve Wirebound's startup/resource footprint on older Windows PCs (i5-4590, ~12 GB RAM, HDD observed on one QA machine), without changing the production Electron app or reclassifying issue #44.

Implemented

  • Separate experiments/tauri-spike app with independent Tauri identifier and NSIS bundle name.
  • Reuses current React/Tailwind UI; an in-memory safe adapter replaces Electron IPC.
  • Device/network actions are disabled; no ADB, Gnirehtet, persistent production settings, telemetry or update checks.
  • Minimal Rust runtime probe and window controls.
  • Benchmark-only PowerShell harness for native-window-visible time and memory, plus scope, caveats, and acceptance gates in README.

Not done / blockers

  • No native build, installer, or real benchmark yet. Rust MSVC and C++ Build Tools were not detected on the linked Windows QA machine. Installing system-wide toolchains has intentionally been deferred.
  • Lockfiles have not been generated yet; Windows toolchain validation is outstanding.
  • Prototype is not a functional replacement for Wirebound: no ADB/relay/tray integration.
  • UI-only startup numbers, even once obtained, MUST NOT be mistaken for end-to-end comparable Electron vs full Tauri feature parity.

Scope guardrails

References: #44, #38.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Windows F: lab validation checkpoint (2026-10-24)

Created an isolated test workspace at F:\Wirebound-Lab on the connected Windows 11 QA PC. Main repo/installed Electron app and profiles were not modified.

Verified locally:

  • Clean shallow checkout of experiment/tauri2-react-spike-20261024 at commit 942c691 (initial clone).
  • Root npm ci --ignore-scripts installed 586 packages; Tauri Lab npm install --ignore-scripts installed 83 packages. Cache and TEMP redirected to F:.
  • npm run build:web passed: Vite 7.3.7, 1,959 modules, 9.04 sec reported build time, JavaScript 294,748 bytes and CSS 36,250 bytes. This is only the React frontend, NOT a Tauri native executable or performance benchmark.
  • Official Rust MSVC toolchain installed locally on F: with no global PATH changes: rustc 1.99.1, cargo 1.99.1. Rust dependencies are being fetched into F:; local lockfiles generated, not yet committed.
  • Official VS 2022 Build Tools bootstrapper downloaded and Microsoft Authenticode signature validated, installer triggered with install/cache paths aimed at F:. Native toolchain installation had not been validated complete at the time of this checkpoint.
  • Local lab scripts created for environment, Build Tools installation, build, logs and benchmark outputs under F:.

Important limits: The QA PC has i5-4590, ~12 GB RAM, mechanical HDD. Tauri startup/RAM improvement remains unmeasured. Visual Studio/Windows SDK may still write system components outside F:. Do not merge or release on this evidence. #44 remains a separate unresolved investigation.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Native build blocker, correction to earlier checkpoint (2026-10-24)

The Visual Studio 2022 Build Tools bootstrapper progressed into Microsoft's setup.exe, but after extended observation there was still no VC\Tools\MSVC directory under the F: lab, and no functional cl.exe verified. The original bootstrapper and its child setup.exe were explicitly terminated to avoid leaving the low-resource QA machine busy with an uncompleted unattended installation. Some Microsoft VS Installer infrastructure may have been written to C:; do not assume a fully portable F-only setup.

Verified additional result: cargo fetch completed with exit code 0, downloading native Rust crate sources into F: and generating a local Cargo.lock.

Native Tauri build, first-window smoke test, RAM measurements, and Electron/Tauri A/B therefore remain NOT DONE. Frontend Vite build is the only successful runtime-facing build evidence. Local handoff is documented at F:\Wirebound-Lab\STATUS-2026-10-24.md. Please keep PR draft, do not merge/release.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Windows native validation & Tauri Lab startup evidence — 2026-10-24

Build prerequisites are now resolved. Verified MSVC x64 compiler cl.exe version 19.44.35229, link.exe, and Windows SDK 26100 rc.exe; Visual Studio's install log reports completion and vswhere resolves F:\Wirebound-Lab\toolchains\msvc. Note the Windows SDK and installer also consumed several GB on C:, despite Rust/cache/build being on F:.

Actual native build passed: cargo build --release --locked for wirebound-tauri-spike, 13m 10s reported, no errors. Executable: F:\Wirebound-Lab\cache\cargo-target\release\wirebound-tauri-spike.exe, 8,854,016 bytes.

First native smoke: Visible window after 336.7 ms, exit 0, isolated WebView2 QA folder populated. This is timing to window visibility, NOT verified completed first-paint or feature readiness.

10 repeated-profile starts: 10/10 visible-window successes; min 46 ms, median 62.35 ms, max 97.5 ms. Raw CSV: F:\Wirebound-Lab\benchmarks\tauri-10runs-20261024.csv. Captured 7-process family working-set sum approximately 245–290 MB; may not include every WebView2 helper process.

10 independent fresh WebView2-profile starts: 10/10 successes; min 90.4 ms, median 98.65 ms, max 112.8 ms. Each profile verified to contain an EBWebView folder. CSV: F:\Wirebound-Lab\benchmarks\tauri-cold-20261024\summary.csv. These are fresh profiles, NOT full cold OS-cache starts.

Important: Tauri Lab deliberately disables real ADB/Gnirehtet and other production backend features; the numbers are not a feature-equivalent comparison to Wirebound Electron. Do not merge this draft PR or claim Tauri resolves #44 before the matching Electron QA comparison, ready-to-paint instrumentation, full resource accounting, and feature parity validation. Earlier user-facing streaming connection interruptions did not affect completion of the fresh-profile benchmark process.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

CRITICAL QA correction — 2026-10-24 (supersedes earlier Tauri startup claims)

Re-auditing the local benchmark exposed false positives in all previously published Tauri visible-window timings (46–113 ms, 20/20) because PowerShell Get-Process.MainWindowHandle selected a visible 16×16 Tao Thread Event Target helper window.

Win32 EnumWindows by PID showed the actual Tauri Window was 1016×729 and remained HIDDEN through four 2-second observations. A WebView2 CDP diagnostic on the same executable showed its page URL was http://127.0.0.1:1420/ (development server), not the embedded production frontend. That server was not running.

Cause: local cargo build --release --locked was used directly rather than the supported Tauri CLI production build, so the binary did not embed/load the frontendDist correctly. Reproduction instructions must use tauri build --no-bundle or npm run build -- --no-bundle (official docs: https://v2.tauri.app/distribute/).

Retract the earlier Tauri startup and RAM claims. Preserve raw files as methodological evidence; do NOT use them for Electron comparisons. A corrected Tauri CLI build is in progress locally. The 10-run isolated Electron QA baseline meanwhile observed 9/10 visible-window successes, one >35s timeout, one 25.3s latency, median 1167.4 ms among 9 visible; 9/10 renderer isolation checks passed. Electron CSV: F:\Wirebound-Lab\benchmarks\electron-visible-20261024.csv. No Electron processes remained afterward. Because real Electron backend differs from Tauri UI-only demo, even corrected timings won't establish full feature parity.

Keep PR DRAFT and issue #44 OPEN. Any future timing harness MUST enumerate top-level windows, verify owner PID, IsWindowVisible, and a minimum realistic dashboard window size (e.g., >400×300), rather than trusting MainWindowHandle.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Corrected and visually verified Windows benchmark (2026-10-24)

This checkpoint supersedes the false-positive Tauri 46–113ms results documented earlier.

Two QA defects corrected:

  1. Bare cargo build --release loaded http://127.0.0.1:1420/ (devUrl) rather than embedded UI. Rebuilt successfully via the official npm run build -- --no-bundle production CLI route; WebView2 CDP then verified http://tauri.localhost/, loaded dashboard DOM, functional Tauri IPC, and safe mock API.
  2. Initial DOM-triggered show_after_renderer_ready did not reliably show the window. Updated Rust command to return is_visible(); JS now retries within a bounded window and only marks readiness after native visibility is confirmed. Updated benchmark uses EnumWindows to find visible, full-size class Tauri Window (>=760×560), explicitly excluding the 16×16 Tao Thread Event Target helper.

Evidence of real UI: Win32 audit confirmed a 1016×729 Tauri Window transitioned hidden→visible and stayed visible. A window-only PrintWindow capture verified the actual React dashboard, controls, Android-device placeholder, diagnostics panel, and 'TAURI LAB · DEMO ONLY' watermark (local: F:\Wirebound-Lab\logs\tauri-verified-visual-mode-2.png). IPC was independently confirmed by CDP. No actual ADB/tethering commands were exposed.

Corrected Tauri data (10 distinct newly created WebView2 QA profiles, no tracing):

  • 10/10 verified full-size dashboard window visible
  • Median 2,830.75 ms; min 2,576.2 ms; max 5,575.5 ms
  • Best-effort 7-process family working-set sum roughly 373–385 MB sampled ~750ms after visibility
  • Raw: F:\Wirebound-Lab\benchmarks\tauri-verified-fresh-20261024\summary.csv
  • A separate verified smoke showed 4,407.7 ms, not included in the 10-run median.
  • No Tauri Lab processes remained after the batch.

Electron issue #44 QA baseline on same machine, 10 fresh isolated profiles, tracing off:

  • 9/10 visible within 35 seconds; 1 timeout >35s
  • Median 1,167.4 ms among the 9 observed successes; one took 25,319.2 ms
  • A separate Win32 enumeration verified that an actually visible Electron window is class Chrome_WidgetWin_1 at 1016×656, matching the normal MainWindowHandle of this build.
  • Raw: F:\Wirebound-Lab\benchmarks\electron-visible-20261024.csv

Interpretation: In this non-feature-equivalent experiment, the functional Tauri UI-only demo had a higher typical visible-window time than warmed Electron QA starts, but no >35s outlier in 10 samples. Working-set figures are not an apples-to-apples physical-RAM measure (shared pages/descendant coverage); and tests were sequential on an HDD PC after heavy build/install activity. This does not prove framework superiority nor explain issue #44. Renderer paint completion is not independently timed. Keep PR #52 DRAFT, no merge or release, no dependency upgrade; a full parity implementation/controlled crossover test would be required before migration.

man612 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

QA note: aborted crossover experiment (2026-10-24)

The new interleaved E/T attempt is not a benchmark result: 1-Hz performance-counter sampling and preflight process inspection stalled severely on the HDD QA machine before the first valid measured launch. A separate npm installation in another project was active concurrently, adding uncontrolled load. No crossover CSV of valid launch times exists. The first harness was stopped and source files marked as qa-retired/*.disabled locally; no production userData was touched and no Wirebound/Tauri QA processes remained.

Keep the previous corrected result as the most recent usable data: 10/10 Tauri real Tauri Window visible, median 2,830.75 ms, and verified screenshot of the actual demo dashboard; older 46–113ms helper-window results still invalid. No PR source change or new framework conclusion in this checkpoint. PR remains draft. Local details in F:\Wirebound-Lab\STATUS-2026-10-24.md.

man612 commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

Archived per maintainer's 2026-10-28 PR-backlog cleanup decision. This is a UI-only Tauri 2 research spike, not feature-parity implementation, a valid Electron-vs-Tauri resource benchmark, or a replacement for the production Electron app. Closing this Draft PR without merging keeps main focused on v1.2.0 stabilization. Keep the experiment branch experiment/tauri2-react-spike-20261024 and the recorded methodological caveats (the previous 46–113ms window detections were invalid). Tauri research can be reopened as a separate task when real native builds and a comparable isolated Windows benchmark are available. Issue #44 remains open. No source files or installed apps were changed.

@man612 man612 closed this Oct 28, 2026
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.

1 participant