perf2000
[0.0.7] — 2026-05-28
Performance sweep
Measured improvements (see BENCH_BASELINE.md for full numbers). All
changes are bench-justified; deferred items are documented inline.
Backend (Rust)
- Tuned
[profile.release](lto=fat, codegen-units=1, opt-level=3,
strip=symbols) for both workspaces;[profile.bench]inherits release. LoadedFile::distinct_keysswitched toHashSet<&str> + Vec(O(N²) → O(N)
in the inner loop).- O(1) symbol lookup:
name_index: HashMap<String, usize>onLoadedFile
andGdxFile.ipc_common_symbols_19files: 287 ms → 25 ms (11×). - Bounded LRU record cache (
crates/gdxcomp-core/src/cache.rs,
Mutex<LruCache<String, Arc<Vec<Rec>>>>) shared viaArc<RecordCache>
acrossLoadedFileclones. Capacity fromGDXCOMP_RECORD_CACHE_SIZE
(default 32).build_view_aggregated_4files: 10.58 ms → 574 µs (18×). build_view,distinct_keys,YearMapper::new,read_param_mapnow
iterateArc<Vec<Rec>>directly — no per-call deep clone.- New
build_chart/build_table+ commandsget_chart_view/
get_table_view. Chart-tab IPC payload −31% (3.77 ms vs 5.48 ms).
Frontend
- Switched
plotly.js-dist-min→plotly.js-basic-dist-min. Bundle 4.86 MB
→ 1.30 MB (−73%). - Vite
manualChunks+React.lazy(ChartView)+ Suspense. Main-entry JS
4.86 MB → 159 kB (30×) for first paint; Plotly fetched in parallel
when the chart tab activates. - Lazy table fetch on tab switch (was: every setup change sent the full
table). Cached client-side; invalidated on setup change. - Skip chart refetch on mode-only toggle when the current symbol has no
tdimension. - Client-side
distinctKeyscache by(symbol, dim), invalidated when
the loaded-file set changes. - Stable
DataTablerow keys so sort/filter doesn't churn React fibers.
Tooling
- Added
BENCH_BASELINE.mdwith criterion median wall-clock for every
bench; rows appended per phase, never overwritten. - New
crates/gdxcomp-core/benches/ipc_loopback.rsmirrors the Tauri
command bodies (includingserde_json::to_string). - Extended
load_and_view.rswith multi-file and pathological cases
(4 / 19 files, largest-symbol, distinct-keys 19-files, aggregated builds). scripts/bundle-size.shcaptures the frontend baseline.