Skip to content

Scope curve reads and bound async result memory - #321

Merged
zerodrift merged 5 commits into
masterfrom
fix/curve-result-memory-20261118
Nov 19, 2026
Merged

zerodrift merged 5 commits into
masterfrom
fix/curve-result-memory-20261118

Conversation

@zerodrift

Copy link
Copy Markdown
Owner

Changes

  • Hydrate curve catalog metadata separately from the bounded asynchronous price result. Send frame summaries and the selected curve's observation lineage. Let the chart paint before starting the advisory close strip.
  • Load the selected curve's declared definition dependencies and retain the exact frame and pin checks, pricing rules and publication authorization.
  • Bound UTF-8 result serialization at the existing 16 MiB budget, write SSE results in chunks under one deadline, and stream calendar pin batch decoding. Keep gzip JSON.

Verification

The same 76-point synthetic power curve and four closes were measured in Release builds on loopback. The full and dependency-scoped reads returned identical results.

Market contracts Median warm click to chart Median SQL statements per read
3,031 132 → 101 ms 98 → 47
12,031 233 → 103 ms 98 → 47

At 12,031 contracts the API median improved by 21–115 ms across two runs. Cold hydration, multi-user capacity and hosted latency remain open.

  • Release managed checks for async result budgets, exact JSON, stream cancellation and compression
  • 50 owned PostgreSQL HTTP/SSE checks and 13 async browser checks, plus exact historical, non-primary and empty-curve coverage
  • 67 browser checks for market dates and close selection
  • 2,244 frontend tests

See D429 and D430 in the verification and decision records for workload details and limits.

Load exact curve dependencies and hydrate catalog metadata separately. Preserve original input and publication checks. Enforce the async result budget during UTF-8 serialization and stream calendar pin decoding.

Signed-off-by: zerodrift <zerodrift@users.noreply.github.com>
Signed-off-by: zerodrift <zerodrift@users.noreply.github.com>
@zerodrift
zerodrift merged commit fd0b4f5 into master Nov 19, 2026
24 checks passed
@zerodrift
zerodrift deleted the fix/curve-result-memory-20261118 branch November 19, 2026 11:15
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