Verified Benchmarks & CI Size Guardrails

DioxusPress follows a strict "measure first, optimize by verified impact, and guard in CI" discipline. Every metric below comes directly from built-in scripts (./scripts/bench_ssr.sh and ./scripts/check_wasm_size.sh) that you can reproduce locally in minutes.


1. Binary, Container Image & Memory Footprint

Measured across our multi-site production stack (debian:trixie-slim runtime images):

Component / TierBinary / Image SizeCold Start to /healthz 200Idle Memory (RSS)Typical Workload
dioxuspress-gateway (Pingora TLS SNI proxy)143 MB image< 50 ms6.4 MiBMulti-domain TLS termination, HTTP/2, and 301 host redirects
basic Zero-DB Tier (--no-default-features --features server)34.2 MiB bin / 269 MB image547 ms91.7 MiB (includes Jieba dictionary + Tantivy mmap)Open-source docs & blogs (e.g. dioxuspress.dev)
accounts / full Tier47.4 MiB bin / 319 MB image549 ms95.6 MiB (~459 MiB live RSS serving 2,200+ indexed docs & courses)Fullstack community & paid course portals (e.g. rustineverything.app)

2. First-Paint SSR, Conditional ETag (304), and Tantivy Search Latency

Measured on Apple Silicon loopback (RUST_LOG=warn, --release, ./scripts/bench_ssr.sh, N=200 serial samples and c=16 concurrent load with N=1,600 requests):

Endpoint (basic Tier)StatusP50 LatencyP99 Latencyc=16 ThroughputNotes
Home Page SSR (GET /)200 OK2.79 ms3.57 ms1,832 QPSFull layout, navbar, feature grid, and SEO metadata
Docs Page SSR (GET /docs/guide/quickstart)200 OK4.04 ms5.05 ms1,236 QPSLive Markdown parse + 3-level sidebar + breadcrumbs + VirtualDOM SSR
English Companion SSR (GET /docs/guide/quickstart?lang=en)200 OK4.15 ms6.67 ms1,219 QPSindex.en.md companion resolution + hreflang alternates
Anonymous Conditional Revalidation (If-None-Match)304 Not Modified0.096 ms0.151 ms13,636 QPSSkips Markdown & VirtualDOM SSR completely (41x faster P50, 10.3x QPS)
Atom Feed (GET /feed.xml)200 OK0.182 ms0.310 ms11,785 QPSServed from DirListingCache
Tantivy Full-Text Search (POST /api/search/query)200 OK0.314 ms0.425 ms9,215 QPSBM25 ranking + bilingual Jieba tokenization + highlighted snippets
💡TIP
Strict Privacy Isolation Against Cache Cross-Contamination

conditional_cache_mw enforces a fail-closed cookie allowlist: weak ETag caching and 304 short-circuiting apply only to anonymous GET/HEAD requests carrying no Authorization header and at most display-only cookies (site_lang, site_theme). Any request carrying session or oauth_pkce cookies — or targeting /admin, /me, /forum, /topics, /course, or /api — receives Cache-Control: private, no-store with ETag stripped.


3. Zero-Downtime CONTENT_DIR Hot Reload (SIGHUP)

When external content is mounted at CONTENT_DIR, running docker kill --signal=HUP dioxuspress-app refreshes content in-place without restarting the container or dropping active TCP connections. Verified under 8-worker continuous load (1,782 concurrent requests):

  • Error rate during reload: 0 non-200 responses;
  • SSR prose propagation: 3.96 ms;
  • Background incremental Tantivy reindex: 272 ms (offloaded via spawn_blocking behind an async writer mutex while search readers remain 100% lock-free).

4. Frontend WebAssembly Bundle Size & CI Guardrail

Root Cargo.toml defines [profile.wasm-release] (opt-level = "z", lto = "fat", codegen-units = 1, strip = "debuginfo"), and GitHub Actions CI enforces upper bounds on every pull request via ./scripts/check_wasm_size.sh:

Client Build TierRaw .wasm (pre-wasm-opt)gzip -9 Transfer Sizebrotli -q 11 Transfer SizeCI Gzip Ceiling
basic (Docs & Blog Hydration)5.52 MiB (5,790,105 B)1.54 MiB1.04 MiB1.86 MiB (1,950,000 B)
full (Community, Courses & Admin)7.59 MiB (7,958,284 B)2.07 MiB1.35 MiB (~1.19 MiB after dx bundle wasm-opt)2.43 MiB (2,550,000 B)

5. Reproduce Locally

# 1. Run full SSR, 304 conditional cache, RSS, and Tantivy benchmark across basic & accounts tiers
./scripts/bench_ssr.sh

# 2. Run the CI WebAssembly bundle size guardrail
./scripts/check_wasm_size.sh