You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memo example memo-ratio-of-quantiles.json is 2.9 MB: store each schema once and write the memo section compact #1033
is 2,895,266 bytes on main. #1031 shrank it from 13.8 MB by storing each memo node once in memo.nodes. The target in #1027 was under 1 MB, and the example still misses it.
Over a third of the compact size is the 1,099 copies of only 15 distinct schemas. The rest of the pretty-printed size is indentation.
Why
stage_pipeline writes the document with serde_json::to_writer_pretty.
Each entry of memo.nodes carries its full output schema, although almost every node shares its schema with many others. Typical cases: a candidate's estimate and its finalize, or the 336 PaneChain state groups.
Proposal
Schema table. Store each distinct schema once as memo.schemas, and have each node in memo.nodes hold schema: <index>. memoNodeDag in tools/dag-viewer/stages.js resolves the index when it rebuilds a DAG, so memo.js and enumeration.js don't change.
Compact JSON. Write the committed memo examples compact.
Alternative: pretty-print everything except memo.
Estimated with both: about 1,154,941 − 391,263 + ~30,000 ≈ 0.8 MB.
Only the memo section changes format. Documents without memo stay as they are.
Scope and acceptance
The committed memo-ratio-of-quantiles.json is under 1 MB.
Activity