Skip to content

Benchmark progressive power curve pricing in the browser - #322

Open
zerodrift wants to merge 1 commit into
masterfrom
perf/progressive-curve-preview
Open

zerodrift wants to merge 1 commit into
masterfrom
perf/progressive-curve-preview

Conversation

@zerodrift

Copy link
Copy Markdown
Owner

Summary

This experiment builds on #321. It compares two ways to display a synthetic power curve. The control prices all deliveries together. The progressive version calculates and streams the first eight prices, then calculates the remaining deliveries against the same pinned snapshot. Both use gzip JSON over SSE and the workbench chart renderer.

Results

Three independent Release runs produced 24 warm observations per workload and mode. The table gives median times with 330 ms of added round-trip latency.

Deliveries Whole curve First eight with streaming Complete with streaming
76 380 ms 366 ms 383 ms
384 414 ms 364 ms 420 ms

Recommendation: keep the compact whole-curve read in the application. Streaming brought the first prices forward by 14–50 ms, below the 100 ms target. Splitting the build repeats snapshot validation and plan setup, and both workloads took longer to finish. The trial starts from an in-memory model and excludes database access, first-use hydration, authorization and the deployed reverse proxy.

Verification

  • Compared every delivery date, contract ID and exact price against the synthetic fixture.
  • Verified partial rendering while the server waited, cleanup after a truncated stream, duplicate-range rejection, cancellation and late delivery after a curve switch.
  • Verified gzip and measured compressed event bodies in Chromium.
  • Both check projects built in Release and all 785 managed core checks passed.

The test runs in an opt-in executable on loopback. Its workload, p50/p95 results and reproduction command are in the verification record.

Signed-off-by: zerodrift <zerodrift@users.noreply.github.com>
Base automatically changed from fix/curve-result-memory-20261118 to master November 19, 2026 11:15

This branch has not been deployed

No deployments
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